Video description method based on global perception feature fusion and sample relation learning
Through the method of global perceptual feature fusion and sample relationship learning, the problems of weight distribution error and data imbalance in video description methods are solved, the video feature fusion effect and description accuracy are improved, and better video content review is achieved.
Patent Information
- Application Number
- CN202410780281.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-10
AI Technical Summary
Existing video description methods ignore the weight distribution of previous moments when fusing video features, causing the model to accumulate weight distribution errors and pay too much attention to redundant frames, which affects the video feature fusion effect. Due to data shortage and imbalanced distribution, the model fails. There is a global bias in the combination and the relationship between samples is ignored.
Using the method of global perceptual feature fusion and sample relationship learning, video features are extracted through Inception-ResNet-V2, C3D and Faster-RCNN models, and the Transformer module is used to learn the relationship between samples, combined with the global perceptual feature fusion control module and text generation module. Perceive the global weight distribution, alleviate the weight distribution error, and alleviate the long-tail word distribution problem through the external language model ELM.
It effectively alleviates the model weight allocation error, improves the video feature fusion effect, encourages the model to learn the relationship between samples, improves the accuracy and consistency of video description, and reduces training problems caused by data imbalance.
Smart Images

Figure CN118629026A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of video description, and in particular relates to a video description method based on global perception feature fusion and sample relationship learning. Background Art
[0002] With the rapid development of the Internet, short videos have become one of the important media for information dissemination. More and more people are beginning to obtain information through short videos. However, due to the increasing number of video resources, manual review of video content is too time-consuming and resource-intensive. Therefore, a new way is needed to help people review video content efficiently.
[0003] The video description method uses deep learning related technologies to extract multi-dimensional features of a given video clip, and generates a corresponding natural language description based on the extracted features. Video description has a large number of practical applications. It can help users efficiently retrieve videos and review their video content, and has great development prospects.
[0004] Most of the existing video description methods are based on the encoder-decoder model in the field of deep learning. In the encoding stage, a sophisticated structure is designed to achieve the fusion of features of different modalities. In the decoding stage, most of them use the soft attention mechanism to generate description sentences. However, most of their methods only consider the state of the previous moment to predict the weight of the current moment, ignoring the impact of the weight distribution of all previous moments on the current moment. This will cause the model to accumulate errors in weight distribution and may pay too much attention to redundant frames, ultimately resulting in poor results in the model fusing video features. Summary of the invention
[0005] In response to the above problems, the present invention proposes a method that can perceive the global weight distribution situation and use the state of the previous moment to allocate the weight of the current moment, so as to alleviate the weight distribution error accumulated by the model; and, due to data shortage and unbalanced data distribution problems that may lead to global deviations in model fitting, in order to encourage the model to learn the relationship between samples, a sample relationship learning module is used to encourage the model to learn the relationship between samples.
[0006] The present invention is based on the encoder-decoder structure model commonly used in the field of deep learning. Before the model starts training, the video features are first extracted through the Inception-ResNet-V2 model to extract video static features, the C3D model is used to extract video dynamic features, and the Faster-RCNN model is used to extract video object features. The object area is clustered according to the relationship between the appearance and the bounding box to obtain the final video object set features, and these multi-dimensional features are sent to the model as training samples to obtain the corresponding natural language description.
[0007] The encoder uses entity module, predicate module and sentence module to encode features. First, the entity module queries the K most important objects in a given set of objects; the predicate module obtains the action features in the video by combining the features of the K main objects queried by the entity module and the dynamic features of the video; the sentence module combines the previously generated main object features, action features and static features to generate the global features of the video. Before feature encoding, the relationship between sample features is learned using the inter-sample relationship learning module. The inter-sample relationship learning module consists of a Transformer module. In order to solve the inconsistency between the training process and the test process, the module adopts a dual-stream structure. This structure creates a copy of the video features in the training phase and uses the inter-sample relationship learning module for training, learns the relationship between samples, and splices the output features with the original features into the subsequent encoding module. In order to avoid introducing additional inference load in the test phase, the inter-sample relationship learning module is deleted.
[0008] The decoder consists of a global perception feature fusion control module and a text generation module. The global perception feature fusion control module is used to control the current feature fusion according to the previous hidden state and the previous weight assignment. The text generation module connects the previous hidden state and the processed features and gradually generates words through LSTM. The long-tail word distribution problem of the subtitle corpus may cause data imbalance training problems. In order to alleviate this problem, the external language model ELM is used to alleviate the long-tail word distribution problem. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 This is a general structural diagram of a video description model based on global perception feature fusion and sample relationship learning of the present invention;
[0010] Figure 2 It is a structural diagram of the global perception feature fusion control module of the present invention; DETAILED DESCRIPTION
[0011] The present invention is further described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0012] Specific structure such as Figure 1 As shown, a video description method based on global perception feature fusion and sample relationship learning includes the following steps:
[0013] S1: Video feature extraction, using the Inception-ResNet-V2 model to extract static features, the C3D model to extract dynamic features, and the Faster-RCNN model to extract object features. The feature size is 2048.
[0014] S2: Semantic label extraction, using the SBERT model to extract the verb label, predicate label and noun label of the corresponding subtitles in the video.
[0015] S3: Use the inter-sample relationship learning module to learn the relationship between samples. The inter-sample relationship learning module creates a video feature copy in the training phase and uses the inter-sample relationship learning module for training. It learns the relationship between samples and concatenates the output features with the original features and sends them to the subsequent encoding module. In the test phase, the inter-sample relationship learning module is deleted and only the original video features are sent to the subsequent encoding module. The formula for the training phase is as follows:
[0016] F old , F bf =copy(F)
[0017] F′ bf = TransformerEncoderLayer(F bf )
[0018] F′=[F old , ,F′ bf ]
[0019] S4: Input the spliced video features into the encoder to obtain visual information features. The encoder structure includes:
[0020] S41: Entity module, used to learn the query main object features. Using a structure similar to DETR, this module consists of a Transformer encoder and a Transformer decoder. Feed it into the Transformer encoder of the entity module:
[0021]
[0022] In order to enable the decoder to query the main object, the video content vector needs to be input as a query into the Transformer decoder. The video content vector is composed of 2D CNNs and 3D CNNs. First, 2D CNNs and 3D CNNs are concatenated and sent to BiLSTM. The output of BiLSTM is max-pooled to obtain the video content vector. It is fed into the Transformer decoder to obtain the feature ε of the main object.
[0023]
[0024] In order to use the entities in the subtitles to supervise the entity module to generate the main object features, the features of the main object are fed into a language head consisting of a fully connected layer. The language head projects the object into the semantic space to obtain the object semantic features.
[0025]
[0026] S42: Predicate module, used to learn video motion features. For each motion feature m, its motion-related object features are calculated by summarizing the main object features.
[0027]
[0028]
[0029]
[0030] Next, the motion-related object features and video dynamic features are connected and sent to BiLSTM to obtain video action features.
[0031]
[0032] In order to use the predicates in the subtitles to supervise the predicate module to generate action features, the video action features are first max-pooled and then sent to a language head consisting of a fully connected layer. The language head projects the action into the semantic space to obtain the action semantic features.
[0033]
[0034] S43: Sentence module, used to learn global features of the video. The main object features and video action features obtained by the previous two modules are summarized to obtain the main object features related to the video context and the action features related to the video context.
[0035]
[0036]
[0037]
[0038] In order to use the entire subtitle to supervise the sentence module to generate global features, the video global features are first max-pooled and then sent to a language head consisting of a fully connected layer. The language head projects the global features into the semantic space to obtain global semantic features.
[0039]
[0040] S5: Use the global perception feature fusion module to perceive the global weight distribution and control the current feature fusion weight distribution. The structure diagram of the global perception feature fusion control module FFCM is as follows: Figure 2 shown.
[0041] First, enter the module's query into and the weight vector at time t-1 Input to multi-head attention MHA to get Will Add it to the input frame-level features and feed the result into the feed-forward network to obtain Then the weight at time t is obtained through the softmax operation Weight With global parameters Multiply to get the memory parameter m at time t t And send it to LSTM to get the weight vector at time t Weight Multiplying with the input frame-level features yields the final module output out. The specific formula is as follows:
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049] The overall formula is as follows:
[0050]
[0051] We use the above modules to fuse the main object features ε, action features Global Features The formula is as follows:
[0052]
[0053]
[0054]
[0055] in, is the action semantic feature, is the global semantic feature, is the previous language prediction vector, w t-1 is the word generated at the previous moment, They are respectively the action weight vector at the previous moment, the global feature weight vector at the previous moment, and the main object feature weight vector at the previous moment. ε′ t They are respectively the action features, global features, and main object features at the current moment after feature fusion.
[0056] S6: Generate video subtitles using the text generation module, which is composed of LSTM. The above three features are integrated into the control module to obtain the output ε′ t Fusion into the total video feature V t , the semantic features obtained in the encoding stage Fusion into the total semantic feature S of the video, the language prediction at the previous moment and the generated word w t-1 And V and S as description generator LSTM lang Input.
[0057]
[0058] LSTM lang Output Calculate the probability distribution P over the D word vocabulary through the fully connected layer and softmax operation t .
[0059]
[0060] The words generated in each step are aggregated to generate the final video description result.
Claims
1. A video description method based on global perception feature fusion and sample relationship learning, characterized in that: The method comprises the following steps: Step 1: Video feature extraction: use the 2D-CNN model to extract static features, use the 3D-CNN model to extract dynamic features, and use the R-CNN model to extract object features; Step 2: Semantic label extraction: use the SBERT model to extract the verb label, predicate label, and noun label of the corresponding subtitles of the video; Step 3: Input the video features extracted in step 1 into the sample relationship learning module, learn the relationship features between samples and concatenate the relationship features and video features to obtain mixed video features; Step 4: Input the mixed video features obtained in step 3 into the encoder to obtain visual information features; use the semantic labels in step 2 to process the visual information features to obtain semantic features; Step 5: Input the visual information features of step 4 and the semantic features of step 5 into the decoder, use the global perception feature fusion module to perceive the global weight distribution, and control the current feature fusion weight distribution; Step 6: Generate video description through LSTM.
2. The video description method based on global perception feature fusion and sample relationship learning according to claim 1 is characterized in that: In the step 1, the Inception-ResNet-V2 model is used to extract static features, the C3D model is used to extract dynamic features, and the Faster-RCNN model is used to extract object features, and the feature size is 2048.
3. The video description method based on global perception feature fusion and sample relationship learning according to claim 1 is characterized in that: In step 2, the size of the semantic label extracted using the SBERT model is 762.
4. The video description method based on global perception feature fusion and sample relationship learning according to claim 1 is characterized in that: In step 3, a video feature copy is created and trained using the sample relationship learning module to learn the relationship between samples and concatenate the relationship features with the video features. The formula is as follows: F old ,F bf =copy(F) F′ bf =TransformerEncoderLayer(F bf ) F′=[F old ,,F′ bf ] 5. The video description method based on global perception feature fusion and sample relationship learning according to claim 1 is characterized in that: In the step 4, the encoder includes an entity module, a predicate module, and a sentence module, wherein the entity module queries the K most important objects in a given object set; the predicate module obtains the action features in the video by combining the features of the K main objects queried by the entity module and the dynamic features of the video; the sentence module combines the previously generated main object features, action features and static features to generate the global features of the video; the object semantic features, action semantic features, and global features are obtained by projecting the object features, action features, and global features into the semantic space by a language head composed of a fully connected layer.
6. The video description method based on global perception feature fusion and sample relationship learning according to claim 1 is characterized in that: In step 6, the global perception feature fusion control module controls the current feature fusion according to the previous hidden state and the previous weight distribution.
7. The video description method based on global perception feature fusion and sample relationship learning according to claim 1 is characterized in that: In step 7, the previous hidden state and the processed features are connected and gradually generated through LSTM.
