Method and system for generating video summaries with spatial-temporal multi-scale interaction
Through the space-time multi-scale interactive video summary generation method, the dual-branch structure and multi-scale interaction method are used to extract the spatial and temporal characteristics of the video, which solves the problem of inaccurate few-sample video summary generation in the existing technology, and realizes the multi-scale interactive video summary generation method. Efficient summary generation in sample scenarios.
Patent Information
- Application Number
- CN202410955850.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-17
AI Technical Summary
Existing video summary methods rely on single-scale features when processing small-sample videos and cannot effectively capture the multi-scale information of the video, resulting in inaccurate summary generation and requiring a large amount of manual annotation data, which is costly.
The video summary generation method uses space-time multi-scale interaction, extracts spatial and temporal features through a dual-branch structure, and combines multi-scale interaction methods to use support sets and summary features for feature fusion to generate multi-scale information to support summary generation.
It achieves rapid generalization in few-sample scenarios, reduces the burden on human annotators, and generates more accurate summaries that can capture the essence of the video and meet the interests and needs of the audience.
Smart Images

Figure CN118506145B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for generating a video summary with spatial-temporal multi-scale interaction. Background Art
[0002] In the era of self-media, a large number of videos are generated every day. It is impossible to supervise such a large number of videos manually. Video summarization aims to compress lengthy videos into shorter and more manageable versions, which is a feasible solution. However, traditional video summarization methods hope to use a standard model to summarize all categories of videos, which requires a large amount of manually labeled data for training. The cost of manual annotation is very high, so it is crucial to effectively utilize available data resources. On the other hand, existing video summarization methods ignore the fact that the focus of summaries of videos of the same category is similar, while videos of different categories are likely to be different, so the focus of summaries can vary greatly depending on the content and context of the video clips. The summary should capture the essence of the video while satisfying the interests and needs of the audience, so understanding the audience's expectations and the key elements of the video content is crucial to making an effective summary.
[0003] Most existing techniques use a single branch to predict summaries, such as using a single branch of a dynamic graph and a transformer architecture to capture spatial-temporal dependencies. These methods only rely on a single scale operation of the input features, which may not be sufficient to provide accurate information for few-shot video summaries. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for generating video summaries with spatial-temporal multi-scale interaction, which can transform the traditional video summary generation technology into a video summary generation technology for a small number of sample scenarios. The model only needs a small number of samples to quickly grasp the key points required for summarization of similar videos, and can quickly generalize to categories that have not been seen in training. In addition, the dual-branch structure is used to obtain spatial-temporal features, and the spatial-temporal features are fully utilized in combination with a multi-scale interactive method to provide multi-scale information for generating summaries.
[0005] According to a first aspect of the present invention, in order to achieve the above-mentioned purpose, the present invention provides the following technical solution: a method for generating a video summary of spatial-temporal multi-scale interaction, specifically comprising the following steps:
[0006] Receive the videos to be processed to form a data set, transform the data set, add categories to each video in the data set, and divide the videos into training sets and test sets according to categories, requiring that the categories in the test set cannot appear in the training set;
[0007] According to the divided training set and test set, select support set videos for their query sets respectively;
[0008] Generate a summary for the selected support set video based on GroundTruth, and the support set video and the support set summary together constitute the support set;
[0009] Input the obtained query set, support set and support set summary into the GoogleNet network to obtain the features of the fifth pooling layer as video frame-level features, and use them as input to the spatiotemporal multi-scale interaction model;
[0010] The acquired video frame-level features are input into the attention network in the time domain multi-scale module to calculate the single-scale temporal features;
[0011] Perform matrix multiplication on the acquired support set video frame-level features and support set summary features to obtain category similarity features, which are input into the time domain multi-scale module;
[0012] The obtained single-scale time series features and category similarity features are input into the time series multi-scale interaction component to obtain the time domain multi-scale fusion features;
[0013] The query set features, support set features and support set summary features are input into the spatial multi-scale module, and the feature vectors are divided into segments of the same size. Position embedding is added to each segment, and a fully connected layer is used to fuse the video features and position embedding.
[0014] The fused features are reorganized, and vectors of equal length are spliced into a square matrix to obtain the reorganized query set visual features, support set visual features, and support set summary features;
[0015] Input the reorganized query set visual features, support set visual features and support set summary features into the spatial multi-scale interaction component to obtain spatial multi-scale fusion features;
[0016] The reorganized query set features and support set features are stretched back to their original dimensions and input into the reconstruction module to reconstruct the query set features and support set features. The reconstructed features and original visual features are constrained by the cycle consistency loss to indirectly ensure the quality of summary generation.
[0017] The obtained time domain multi-scale fusion features and spatial domain multi-scale fusion features are input into the fusion module for feature fusion and prediction of the final summary generation.
[0018] Furthermore, regarding the calculation of the single-scale time series features, the calculation process is as follows:
[0019]
[0020]
[0021] in, , which represent the learnable parameters of the key, query, value and linear output layers in the attention mechanism respectively; represents the input of query set video, support set video and support set summary, It means that these three extract the single-scale features of temporal information through the attention network, that is, the query features , Support Features , support summary features .
[0022] Furthermore, the single-scale time series features and category similarity features are input into the time series multi-scale interaction component to obtain the time domain multi-scale fusion features, as follows:
[0023] (1) The obtained single-scale temporal features and category features are used to generate features of multiple scales using an adaptive average pooling operation;
[0024] (2) concatenate the four features of the corresponding scale;
[0025] (3) Use interpolation operations to unify the splicing features of different scales into the same dimension;
[0026] (4) Add the multi-scale features of the same dimension to obtain the multi-scale fusion features in the time domain.
[0027] Furthermore, the reorganized query set visual features, support set visual features, and support set summary features are input into the spatial multi-scale interaction component to obtain the spatial multi-scale fusion features, as follows:
[0028] (1) The query set visual features, support set visual features, and support set summary features reorganized in S9 are used to generate features of multiple scales using an adaptive average pooling operation;
[0029] (2) concatenate the three features of the corresponding scale;
[0030] (3) Adoption Convolution extracts spatial information from the concatenated features to obtain spatial features at multiple scales;
[0031] (4) stitching together spatial features at multiple scales;
[0032] (5) Use interpolation operations to merge multi-scale spatial features to obtain spatial multi-scale fusion features.
[0033] Furthermore, regarding cycle consistency loss , as follows:
[0034]
[0035] In the formula, Represents the visual features of the query set, represents the support set visual features, represents the query set reconstruction feature, Represents the support set reconstruction features.
[0036] Furthermore, the fusion module includes a fully connected layer and two prediction networks, each prediction network includes a fully connected layer, a ReLU activation function, a dropout random inactivation layer and a normalization layer.
[0037] Furthermore, in the process of feature fusion and prediction of the final summary generation, the focal loss is used , Timing Intersection and Convergence Loss and binary cross entropy loss Constraining the importance score, position regression and centrality in the predicted Y, the overall loss is as follows:
[0038]
[0039]
[0040]
[0041] in, and Indicates Importance scores of frame predictions and human annotation scores, and Indicates The predicted time interval and the actual time interval of each segment, and Indicates The predicted and true centrality scores for each segment.
[0042] According to a second aspect of the present invention, the present invention provides a spatial-temporal multi-scale interactive video summary generation system, characterized in that it includes:
[0043] The data set transformation module is used to receive the videos to be processed to form a data set, transform the data set, add categories to each video in the data set, and divide the videos into training sets and test sets according to the categories, requiring that the categories in the test set cannot appear in the training set;
[0044] A selection module is used to select support set videos for the query set according to the divided training set and test set;
[0045] A summary generation module is used to generate a summary for the selected support set video according to GroundTruth, and the support set video and the support set summary together constitute the support set;
[0046] An acquisition module is used to input the acquired query set, support set and support set summary into the GoogleNet network to obtain the features of the fifth pooling layer as video frame-level features, and as input of the spatiotemporal multi-scale interaction model;
[0047] The first calculation module is used to input the acquired video frame-level features into the attention network in the time domain multi-scale module to calculate the single-scale temporal features.
[0048] The category feature acquisition module is used to perform matrix multiplication on the acquired support set video frame-level features and support set summary features to obtain category similarity features and input them into the time domain multi-scale module;
[0049] The second calculation module is used to input the obtained single-scale time series features and category similarity features into the time series multi-scale interaction component to obtain the time domain multi-scale fusion features;
[0050] The embedding fusion module is used to input the obtained query set features, support set features and support set summary features into the spatial multi-scale module, and divide the feature vectors into segments of the same size, add position embedding to each segment, and use a fully connected layer to fuse the video features and position embedding;
[0051] A reorganization module is used to reorganize the fused features and splice vectors of equal length into a square matrix to obtain the reorganized query set visual features, support set visual features and support set summary features;
[0052] The third computing module is used to input the reorganized query set visual features, support set visual features and support set summary features into the spatial multi-scale interaction component to obtain spatial multi-scale fusion features;
[0053] The reconstruction module is used to stretch the reorganized query set features and support set features back to their original dimensions and input them into the reconstruction module to reconstruct the query set features and support set features. The cycle consistency loss is used to constrain the reconstructed features and the original visual features, indirectly ensuring the quality of summary generation.
[0054] The input fusion module is used to input the obtained time domain multi-scale fusion features and spatial domain multi-scale fusion features into the fusion module to perform feature fusion and predict the final summary generation.
[0055] The present invention has at least the following beneficial effects:
[0056] (1) This paper proposes a new task, called few-shot video summarization, which aims to generate a summary for a video using only a limited number of support samples. Few-shot video summarization introduces category information into the video summarization task, and only requires a small number of samples in the new category to quickly generalize to unseen new categories, thus reducing the annotation burden on human annotators.
[0057] (2) The present invention provides the first standard model for the few-shot video summarization task, namely STeMI, which extracts spatial and temporal features through a dual-branch structure and further interacts spatial and temporal features at multiple scales, providing rich information for the few-shot video summarization task.
[0058] (3) This paper transplants the latest techniques of several video summarization techniques into the few-shot scenario and retrains the model to obtain the results in the few-shot scenario so that our model can be fairly compared and the subsequent work on this new task can have a reference model for comparison.
[0059] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a schematic diagram of the process of the method of the present invention;
[0061] Figure 2 is a network structure diagram of the method of the present invention;
[0062] Figure 3 It is a schematic diagram of the structure of the time multi-scale interaction and space multi-scale interaction components of the method described in the present invention. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0064] Embodiment 1:
[0065] The technical solution of the present invention introduces a new few-shot video summary generation task to solve the problem of limited number of samples in the existing video summary dataset. First, the existing dataset is transformed to add categories to each video, and then the training set and the test set are divided into two parts with non-overlapping categories. Then, the data of a video of the same category is selected as the support set for the video to be summarized, and the video features are extracted using GoogleNet. A new few-shot video summary method, called spatial-temporal multiscale interaction (STeMI), is introduced to train a model with good generalization performance when there are only a few samples of the new category. The temporal multiscale module uses an attention machine The system obtains single-scale temporal information, obtains category similarity features based on the support set, and uses the temporal multi-scale interaction component to obtain the temporal multi-scale fusion features; the spatial multi-scale module divides the frame-level features equally and adds position embeddings, then reassembles and splices them, and obtains the spatial multi-scale fusion features through the spatial multi-scale interaction component; STeMI mines and utilizes the spatial and temporal dual-branch feature representation through the multi-scale interaction component; feature reconstruction ensures that the reorganized spatial features are consistent with the original features, prevents deviations, and indirectly ensures the quality of the generated summary; the fusion module splices the temporal multi-scale fusion features and the spatial multi-scale fusion features together for feature fusion, and predicts the final result.
[0066] See also Figure 1-3 The present invention provides a technical solution: a method for generating a video summary of spatial-temporal multi-scale interaction, which specifically includes the following steps:
[0067] S1 creates categories for videos in the dataset: The dataset is transformed, and the large language model GPT3.5 is used to add categories to each video in the benchmark datasets TVSum and SumMe according to the title of each video in the dataset and the prompt information. The videos are divided into training sets and test sets according to the categories. It is required that the categories in the test set cannot appear in the training set. A total of 5 groups of cross experiments are divided, and the experimental results take the average of the 5 groups of cross experiments;
[0068] S2 selects support sets from similar videos: select support set videos for the query sets in the training set and test set divided in S1, so as to complete the transformation from traditional video summarization to few-sample video summarization. The selection rule of support set videos is: for each query set video, randomly select a video from the same category of videos as the support set video;
[0069] S3: Generate the corresponding support set summary based on the GroundTruth of the support set video. The support set video and the support set summary together constitute the support set, providing summary information of the same category for the query set;
[0070] S4 video feature extraction: Input the query set and support set obtained in S2 and S3 into the GoogleNet network to obtain the features of the fifth pooling layer as video frame-level features, i.e., the input of the model;
[0071] S5 obtains single-scale time series features: Figure 2 As shown, the video features obtained in S4 Send it to the attention network in the time domain multi-scale module to obtain single-scale temporal features , the detailed calculation process of the attention network is as follows:
[0072]
[0073]
[0074]
[0075]
[0076] in, They represent the learnable parameters of the key, query, value, and linear output layers in the attention mechanism, and their sizes are ; Here we use a multi-head attention mechanism, It represents the dimension of a single head; represents the input of query set video, support set video and support set summary, It means that these three extract the feature output of time series information through the attention network, that is, the query feature , Support Features , support summary features ;
[0077] S6 obtains the category similarity feature: perform matrix multiplication on the support set video feature and the support set summary feature obtained in S4 to obtain the category similarity feature , input into the time domain multi-scale module;
[0078] S7: Input the single-scale temporal features and category features obtained in S5 and S6 into the temporal multi-scale interaction component to obtain the temporal multi-scale fusion features, such as Figure 3 As shown in (a) in the figure, the specific operations are as follows:
[0079] S7-1: The single-scale time series features obtained from S5 and S6 , , and categorical features Generate using adaptive average pooling operation n The characteristics of the scale n Defined as the first term of a geometric sequence with a first term of 1 and a common ratio of 2.n The sequence of items is generated n The features of the scale mean reducing the original features to the original feature dimensions. times;
[0080] Temporal multi-scale interaction extracts multi-scale features in the dimension of frames, namely, generate , the feature dimension is Transformed into ,in Indicates the frame number; at the same time, generate ,Depend on generate ,Depend on generate , the feature dimensions also change accordingly;
[0081] S7-2: The four features of the corresponding scales are stitched together, i.e. ;
[0082] S7-3: Use interpolation operations to unify the splicing features of different scales into the same dimension to obtain multi-scale fusion features, that is, ;
[0083] S7-4: Add multi-scale features of the same dimension to obtain multi-scale fusion features in the time domain ,Right now
[0084] ;
[0085] S8: Figure 2 As shown, the query set visual features obtained by S4 are , support set visual features and support set summary features Input into the spatial multi-scale module and divide the feature vector into segments of the same size , and add position embedding for each fragment , a fully connected layer is used to fuse video features and position embeddings;
[0086] S9 frame feature reorganization and splicing: reorganize the features fused in S8, splice the vectors of equal length into a square matrix, and obtain the reorganized query set visual features , support set visual features and support set summary features , the feature dimension is changed from the original The vector becomes phalanx;
[0087] S10: Input the query set features, support set features and support set summary features reorganized in S9 into the spatial multi-scale interaction component to obtain the spatial multi-scale fusion features, such as Figure 3 As shown in (b) in the figure, the specific operations are as follows:
[0088] S10-1: Reorganize the query set visual features in S9 , support set visual features and support set summary features Generate using adaptive average pooling operation n Features of the scale;
[0089] Spatial multi-scale interaction extracts multi-scale features within the reconstructed frame, namely, generate , the feature dimension is Transformed into ,in Indicates the frame number; at the same time, generate ,Depend on generate , the feature dimensions are changed accordingly;
[0090] S10-2: Concatenate the three features of the corresponding scales together in the frame dimension, i.e. ;
[0091] S10-3: Adoption Convolution extracts spatial information from the concatenated features to obtain multi-scale fusion features, namely ;
[0092] S10-4: stitching together multi-scale fusion features, i.e. ;
[0093] S10-5: Use interpolation operation to merge multi-scale fusion features to obtain spatial multi-scale fusion features, that is, , and finally flatten it to obtain the spatial multi-scale fusion feature ;
[0094] S11 feature reconstruction: Figure 2 As shown, the query set visual features reorganized in S9 , support set visual features Stretch and restore to the original dimension, input into the reconstruction module, and obtain the query set reconstruction features and support set reconstruction features ;
[0095] The reconstruction module contains a fully connected layer, a ReLU activation function, a fully connected layer, and a Sigmoid activation function;
[0096] The cycle consistency loss is used to constrain the reconstructed features and the original visual features, which indirectly ensures the quality of summary generation. as follows:
[0097]
[0098] In the formula, Represents the visual features of the query set, represents the support set visual features, represents the query set reconstruction feature, represents the reconstruction features of the support set;
[0099] S12 Feature Fusion and Prediction Summary: The time domain multi-scale fusion features obtained in S7 are And the spatial multi-scale fusion features obtained in S10 Input to the fusion module to splice the spatial and temporal features together, that is, , perform feature fusion, and predict the final summary .
[0100] Furthermore, the fusion module contains a fully connected layer and two prediction networks, each of which contains a fully connected layer, a ReLU activation function, a dropout random inactivation layer and a normalization layer.
[0101] Using focal loss , Timing Intersection and Convergence Loss and binary cross entropy loss Constraining the importance score, position regression and centrality in the predicted Y, the overall loss is as follows:
[0102]
[0103]
[0104]
[0105] in, and Indicates Importance scores of frame predictions and human annotations, and Indicates The predicted time interval and the actual time interval of each segment, and Indicates The predicted and true centrality scores for each segment.
[0106] Next, in order to verify the effectiveness of the method, the present invention conducted multiple groups of comparative experiments and ablation experiments on multiple data sets to compare the performance of the method of the present invention with some classic or advanced methods.
[0107] A. Test conditions
[0108] 1. Experimental Database
[0109] The two datasets used in this invention are TVSum and SumMe. To meet the needs of few-sample video summarization, each video is classified according to the video title in the dataset. The detailed introduction is shown in Table 1:
[0110] Table 1 Detailed description of the dataset
[0111]
[0112] The dataset is divided into a training set and a test set, with no overlap in categories. There are five groups of cross-experiments in total, and the test sets of all five groups of experiments cover all categories. Further, for each query set in the training set and the test set, different videos of the same category and their summaries are selected as support sets to constitute the model input of few-shot video summarization; the temporal scale of the TVSum and SumMe datasets is set to 4, the spatial scale of SumMe is set to 2, and the spatial scale of TVSum is set to 6.
[0113] B. Test results evaluation criteria
[0114] Similar to the traditional video summary evaluation indicators, few-shot video summarization also uses -score is used to evaluate the prediction results of the summary, and Kendall is also used and Spearman The correlation coefficient is used to evaluate the correlation between the predicted score and the human annotation. -score calculation formula is as follows:
[0115]
[0116]
[0117]
[0118] in represents a true summary, represents a summary of the forecast, Indicates the accuracy, Represents the recall rate.
[0119] C. Comparative Experimental Scheme
[0120] The present invention first transforms the current cutting-edge video summarization method into a method under the few-sample setting. It is compared with other current cutting-edge video summarization methods on the two datasets SumMe and TVSum. All these methods use the attention mechanism. The comparison results are shown in Table 2.
[0121] Table 2 Comparison of few-sample video summarization effects
[0122]
[0123] STeMI is a spatial-temporal multi-scale interactive network for few-sample video summarization designed by the present invention. Table 2 compares and analyzes the results of the latest method and the method of the present invention. The method of the present invention outperforms other methods in all indicators, including Scores and correlation coefficients.
[0124] Specifically, the present invention is based on the SumMe and TVSum datasets. The score is improved by more than 1% compared with the second-place method STVT, indicating that the prediction is more accurate. In addition, the method of the present invention is more accurate in Kendall and Spearman The results on both indicators are significantly better than those of other methods, indicating that the prediction scores of the present invention are closely consistent with human annotations; the attention mechanism has significantly improved the performance of many video summary generation methods, including VASNet, PGL-SUM, DSNet and STVT. These methods all benefit from using the attention mechanism to capture temporal information in the video, which has been proven to be effective compared to previous methods. However, when these methods are used for summary tasks, they still face some limitations. For example, although VASNet and DSNet effectively use the attention mechanism to integrate temporal information, they may not perform well in generating short summaries. PGL-SUM combines global and local attention mechanisms to capture information at different temporal granularities, thereby addressing some limitations of global attention. The recent STVT introduces a visual Transformer architecture to extract spatiotemporal information. However, these methods are designed and evaluated for traditional dataset settings and may not be able to fully exert their capabilities when facing few-shot learning scenarios. In contrast, the method of the present invention takes advantage of the existing video summary methods and specially designs the architecture to address the challenges of few-shot learning. By extracting multi-scale spatial and temporal information, the method of the present invention surpasses the existing methods and proves its effectiveness in processing summary video tasks in few-shot scenarios.
[0125] D. Ablation Experiment
[0126] 1. Module Analysis
[0127] In order to specifically prove that each module is effective, the present invention conducts ablation experiments on two datasets, TVSum and SumMe.
[0128] Our invention consists of four modules, namely the spatial multi-scale module (SMM), the temporal multi-scale module (TMM), the reconstruction module (RM) and the fusion module (MM). In the fusion module, we concatenate the temporal multi-scale fusion features (TMI) and the spatial multi-scale fusion features (SMI). If either SMM or TMM is removed, there is no need to merge the two features. In addition, the RM module utilizes spatial multi-scale features, so the RM module will not work after the SMM module is removed. Based on these prerequisites, we conducted an ablation study to evaluate the model in seven combinations of SMM, TMM, RM and MM. The impact of the scores is shown in Table 3; it should be noted that when the MM module is omitted in the process of merging TMI and SMI features, the two types of features will be directly connected, and a fully connected layer is required to reduce the dimension of the concatenated features.
[0129] When only the SMM module is activated, the results on both TVSum and SumMe datasets show a decline. Subsequently, when the SMM and RM modules are activated, the results on both datasets are improved, indicating that the consistency between the original and reorganized features has been established. Activating only the TMM module performs better than activating only the SMM and RM modules, which shows the importance of multi-scale temporal information in the summary generation process; however, if TMI and SMI features are spliced without the MM module, the results become unstable. After further activating the RM module, the results are still unstable, which highlights the importance of the fusion module. When TMI features and SMI features are merged through the MM module without reconstructing the original features, the results are further improved, indicating that merging multi-scale spatial and temporal features provides more effective information for generating summaries, and the MM module has a good effect on feature fusion; finally, based on the effect of the aforementioned RM module, we activate the RM module after merging spatial and temporal features to form STeMI;
[0130] Ablation experiments confirm that in the few-shot video summarization task, both spatial and temporal information play an important role, the consistency constraint ensures the rationality of the reconstruction process, and it is the gradual combination of these four modules that contributes to the final performance of the present invention.
[0131] Table 3 Ablation experiments of each module in the network structure
[0132]
[0133] 2. Hyperparameter Analysis
[0134] We conducted 5×4 sets of experiments to explore the influence of the scale parameter n in temporal multi-scale interaction and spatial multi-scale interaction, as shown in Table 4. Specifically, increasing the temporal scale while fixing the spatial scale will cause the results to fluctuate, and vice versa. The best performance was achieved by the combination of spatial and temporal scales, where for the SumMe dataset, the temporal scale was set to 4 and the spatial scale was set to 2; for the TVSum dataset, the temporal scale was set to 4 and the spatial scale was set to 6. The temporal information captures the relationship between frames, while the spatial information extracts the relationship within the frame. The present invention combines multi-scale methods to enhance the interaction between local and global information, while capturing long-range information, alleviating the problem of missing key information across multiple video frames, thereby effectively utilizing the information from the support set and the query set.
[0135] Table 4 Ablation experiments of temporal scale and spatial scale hyperparameters in multi-scale interaction components
[0136]
[0137] In summary, the ablation experiments conducted by STeMI on the TVSum and SumMe datasets demonstrate the effectiveness of each module in the few-sample video summarization spatio-temporal multi-scale interaction network designed by the present invention, and provide a basis for the selection of temporal scale and spatial scale hyper-parameters.
[0138] Embodiment 2:
[0139] The present invention provides a spatial-temporal multi-scale interactive video summary generation system, comprising:
[0140] The data set transformation module is used to receive the videos to be processed to form a data set, transform the data set, add categories to each video in the data set, and divide the videos into training sets and test sets according to the categories, requiring that the categories in the test set cannot appear in the training set;
[0141] A selection module is used to select support set videos for the query set according to the divided training set and test set;
[0142] A summary generation module is used to generate a summary for the selected support set video according to GroundTruth, and the support set video and the support set summary together constitute the support set;
[0143] An acquisition module is used to input the acquired query set, support set and support set summary into the GoogleNet network to obtain the features of the fifth pooling layer as video frame-level features, and as input of the spatiotemporal multi-scale interaction model;
[0144] The first calculation module is used to input the acquired video frame-level features into the attention network in the time domain multi-scale module to calculate the single-scale temporal features.
[0145] A category feature acquisition module is used to perform matrix multiplication on the support set video frame-level features and support set summary features obtained above to obtain category similarity features and input them into the time domain multi-scale module;
[0146] The second calculation module is used to input the single-scale time series features and category similarity features obtained above into the time series multi-scale interaction component to obtain the time domain multi-scale fusion features;
[0147] The embedding fusion module is used to input the obtained query set features, support set features and support set summary features into the spatial multi-scale module, and divide the feature vectors into segments of the same size, add position embedding to each segment, and use a fully connected layer to fuse the video features and position embedding;
[0148] A reorganization module is used to reorganize the above fused features, splice vectors of equal length into a square matrix, and obtain the reorganized query set visual features, support set visual features and support set summary features;
[0149] The third computing module is used to input the reorganized query set visual features, support set visual features and support set summary features into the spatial multi-scale interaction component to obtain spatial multi-scale fusion features;
[0150] The reconstruction module is used to stretch the reorganized query set features and support set features back to their original dimensions and input them into the reconstruction module to reconstruct the query set features and support set features. The cycle consistency loss is used to constrain the reconstructed features and the original visual features, indirectly ensuring the quality of summary generation.
[0151] The input fusion module is used to input the time domain multi-scale fusion features and the spatial domain multi-scale fusion features obtained above into the fusion module to perform feature fusion and predict the final summary generation.
[0152] Specifically, the above-mentioned data set transformation module, selection module, summary generation module, etc. can be embedded in a computer processing system. The computer calls the above-mentioned modules to complete the task of equivalent modeling based on the above-mentioned video summary generation method for spatio-temporal multi-scale interaction. The above-mentioned data set transformation module, selection module, summary generation module, etc. can perform operations according to the specific steps given in the above-mentioned video summary generation method for spatio-temporal multi-scale interaction.
[0153] It should be noted that it should be understood that the division of the various modules of the above system is only the division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated, and these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the data set transformation module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above signal processing module, the implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by the hardware integrated logic circuit in the processor element or the instruction in the form of software.
[0154] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0155] Embodiment three:
[0156] The present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the memory stores a computer program capable of running on the processor, and when the processor loads and executes the computer program, the above-mentioned space-time multi-scale interactive video summary generation method is adopted.
[0157] It should be noted that the terminal device can be a computer device such as a desktop computer, a laptop computer or a cloud server, and the terminal device includes but is not limited to a processor and a memory. For example, the terminal device can also include input and output devices, network access devices and buses.
[0158] Furthermore, the processor may adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. may also be adopted. The general-purpose processor may adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.
[0159] Embodiment 4:
[0160] The present invention provides a storage medium containing computer executable instructions, which are used to execute the above-mentioned space-time multi-scale interactive video summary generation method when executed by a computer processor.
[0161] Among them, the computer program can be stored in a computer-readable medium, the computer program includes computer program code, the computer program code can be in the form of source code, object code, executable file or certain middleware, etc. The computer-readable medium includes any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the computer-readable medium includes but is not limited to the above-mentioned components.
[0162] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0163] For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. When an element is referred to as being "assembled on", "installed on", "fixed on" or "set on" another element, it can be directly on the other element or there can also be a centered element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be a centered element at the same time. The terms "vertical", "horizontal", "up", "down", "left", "right" and similar expressions used herein are only for illustrative purposes and are not intended to be the only implementation method.
[0164] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
[0165] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. 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 disclosure. 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.
Claims
1. Video summary generation method with spatial-temporal multi-scale interaction, It is characterized in that The specific steps include: Receive the videos to be processed to form a data set, transform the data set, add categories to each video in the data set, and divide the videos into training sets and test sets according to categories, requiring that the categories in the test set cannot appear in the training set; According to the divided training set and test set, select support set videos for their query sets respectively; Generate a summary for the selected support set video based on GroundTruth, and the support set video and the support set summary together constitute the support set; Input the obtained query set, support set and support set summary into the GoogleNet network to obtain the features of the fifth pooling layer as video frame-level features, and use them as input to the spatiotemporal multi-scale interaction model; The acquired video frame-level features are input into the attention network in the time domain multi-scale module to calculate the single-scale temporal features; Perform matrix multiplication on the acquired support set video frame-level features and support set summary features to obtain category similarity features, which are input into the time domain multi-scale module; The obtained single-scale time series features and category similarity features are input into the time series multi-scale interaction component to obtain the time domain multi-scale fusion features; The query set features, support set features and support set summary features are input into the spatial multi-scale module, and the feature vectors are divided into segments of the same size. Position embedding is added to each segment, and a fully connected layer is used to fuse the video features and position embedding. The fused features are reorganized, and vectors of equal length are spliced into a square matrix to obtain the reorganized query set visual features, support set visual features, and support set summary features; Input the reorganized query set visual features, support set visual features and support set summary features into the spatial multi-scale interaction component to obtain spatial multi-scale fusion features; The reorganized query set features and support set features are stretched back to their original dimensions and input into the reconstruction module to reconstruct the query set features and support set features. The reconstructed features and original visual features are constrained by the cycle consistency loss to indirectly ensure the quality of summary generation. The obtained time domain multi-scale fusion features and spatial domain multi-scale fusion features are input into the fusion module to perform feature fusion and predict the final summary generation; Regarding the calculation of single-scale time series features, the calculation process is as follows: in, , which represent the learnable parameters of the key, query, value and linear output layers in the attention mechanism respectively; represents the input of query set video, support set video and support set summary, It means that these three extract the single-scale features of temporal information through the attention network, that is, the query features , Support Features , support summary features ; The single-scale time series features and category similarity features are input into the time series multi-scale interaction component to obtain the time domain multi-scale fusion features, as follows: (1) The obtained single-scale temporal features and category features are used to generate features of multiple scales using an adaptive average pooling operation; (2) concatenate the four features of the corresponding scale; (3) Use interpolation operations to unify the splicing features of different scales into the same dimension; (4) Add multi-scale features of the same dimension to obtain multi-scale fusion features in the time domain; The reorganized query set visual features, support set visual features, and support set summary features are input into the spatial multi-scale interaction component to obtain the spatial multi-scale fusion features, as follows: (1) The query set visual features, support set visual features, and support set summary features reorganized in S9 are used to generate features of multiple scales using an adaptive average pooling operation; (2) concatenate the three features of the corresponding scale; (3) Adoption Convolution extracts spatial information from the concatenated features to obtain spatial features at multiple scales; (4) stitching together spatial features at multiple scales; (5) Use interpolation operations to merge multi-scale spatial features to obtain multi-scale fusion features in the spatial domain; About cycle consistency loss , as follows: In the formula, Represents the visual features of the query set, represents the support set visual features, represents the query set reconstruction feature, represents the reconstruction features of the support set; The fusion module includes a fully connected layer and two prediction networks, each prediction network includes a fully connected layer, a ReLU activation function, a dropout random inactivation layer and a normalization layer; In the process of feature fusion and predicting the final summary generation, the focal loss is used , Timing Intersection and Convergence Loss and binary cross entropy loss Constraining the importance score, position regression and centrality in the predicted Y, the overall loss is as follows: in, and Indicates Importance scores of frame predictions and human annotations, and Indicates The predicted time interval and the actual time interval of each segment, and Indicates The predicted and true centrality scores for each segment.
2. A spatial-temporal multi-scale interactive video summary generation system, It is characterized in that The method for generating a video summary for realizing the spatial-temporal multi-scale interaction of claim 1 comprises: The data set transformation module is used to receive the videos to be processed to form a data set, transform the data set, add categories to each video in the data set, and divide the videos into training sets and test sets according to the categories, requiring that the categories in the test set cannot appear in the training set; A selection module is used to select support set videos for the query set according to the divided training set and test set; A summary generation module is used to generate a summary for the selected support set video according to GroundTruth, and the support set video and the support set summary together constitute the support set; An acquisition module is used to input the acquired query set, support set and support set summary into the GoogleNet network to obtain the features of the fifth pooling layer as video frame-level features, and as input of the spatiotemporal multi-scale interaction model; The first calculation module is used to input the acquired video frame-level features into the attention network in the time domain multi-scale module to calculate the single-scale temporal features. The category feature acquisition module is used to perform matrix multiplication on the acquired support set video frame-level features and support set summary features to obtain category similarity features and input them into the time domain multi-scale module; The second calculation module is used to input the obtained single-scale time series features and category similarity features into the time series multi-scale interaction component to obtain the time domain multi-scale fusion features; The embedding fusion module is used to input the obtained query set features, support set features and support set summary features into the spatial multi-scale module, and divide the feature vectors into segments of the same size, add position embedding to each segment, and use a fully connected layer to fuse the video features and position embedding; A reorganization module is used to reorganize the fused features and splice vectors of equal length into a square matrix to obtain the reorganized query set visual features, support set visual features, and support set summary features; The third computing module is used to input the reorganized query set visual features, support set visual features and support set summary features into the spatial multi-scale interaction component to obtain spatial multi-scale fusion features; The reconstruction module is used to stretch the reorganized query set features and support set features back to their original dimensions and input them into the reconstruction module to reconstruct the query set features and support set features. The cycle consistency loss is used to constrain the reconstructed features and the original visual features, indirectly ensuring the quality of summary generation. The input fusion module is used to input the obtained time domain multi-scale fusion features and spatial domain multi-scale fusion features into the fusion module to perform feature fusion and predict the final summary generation.
Citation Information
Patent Citations
Online video abstract generation method based on cross-scene knowledge migration
CN116340568A
Progressive multi-scale context learning time sequence target positioning method
CN117876929A
Video frame interpolation using three-dimensional space-time convolution
US20230344962A1
