Video key frame extraction method based on adaptive grouping and feature map information entropy

Through the method of combining adaptive grouping and feature map information entropy, video key frames are extracted, which solves the problem of poor action recognition accuracy in the existing technology, achieves more efficient video key frame extraction, and is suitable for action recognition and video compression.

CN118628955APending Publication Date: 2024-09-10ZHEJIANG SCI-TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410736297.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-10

Smart Images

  • Figure CN118628955A
    Figure CN118628955A
Patent Text Reader

Abstract

The invention discloses a video key frame extraction method based on adaptive grouping and feature map information entropy. The method comprises the following steps: firstly, segmenting a selected video into a video frame sequence according to the frame rate of the video; then, calculating the structural similarity between two adjacent frames in the video frame sequence so as to obtain a similarity sequence of the current video; calculating a self-adaptive threshold value by using the similarity sequence, and grouping the video frame sequence according to the self-adaptive threshold value to obtain a plurality of image groups of the current video; and finally, in combination with the information entropy of the feature map, respectively extracting key frames of each image group, thereby obtaining all key frames of the current video, and completing extraction of the video key frames. According to the method, the accuracy of key frame extraction is greatly improved by adopting the method of combining the SSIM and the information entropy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a video key frame extraction method in the field of video information processing, and specifically relates to a video key frame extraction method based on adaptive grouping and feature map information entropy (SSIM+Feature map+Information Entropy). Background Art

[0002] At present, the application of key frame extraction is very extensive, which involves the following contents:

[0003] Video summarization and browsing: By extracting key frames from video sequences, you can generate a summary of the video, reduce the amount of video data, and facilitate quick browsing and previewing of video content. Video retrieval and indexing: By extracting key frames, you can create an index for the video library to facilitate video retrieval and content search. Video content analysis: Key frame extraction can be used as a preprocessing step for video content analysis to reduce the amount of video data and extract representative frames, thereby more efficiently performing video content analysis, such as target detection, behavior recognition, event detection, etc. Video compression and transmission: By extracting key frames, you can reduce the amount of video data and improve the efficiency of video compression and transmission. Transmitting only key frames can reduce transmission bandwidth and storage requirements while maintaining video quality.

[0004] A wide range of video datasets have been released, such as HMDB51, UCF-101, Sports-1M, and Youtube-8M. However, considering all frames will weaken the classification performance because some frames have more unique information than others. Therefore, selecting key frames is very important to achieve better classification performance. By extracting key frames, the video sequence can be reduced to a few representative frames, thereby reducing the amount of data. Action recognition usually needs to consider the temporal nature of the action, while traditional key frame extraction methods usually only consider the static features of the image. Key frame extraction methods select key frames based on factors such as image quality and motion blur, but this may not capture the continuity and dynamic changes of the action. Based on this, a key frame extraction method designed for the characteristics of action recognition is proposed. Summary of the invention

[0005] In view of the shortcomings of the video key frames obtained by the above-mentioned key frame extraction method, such as the inability to be targeted at action recognition and the poor accuracy of key frame extraction, the present invention proposes a key frame extraction method based on adaptive grouping and feature map information entropy. The present invention groups according to the video frame similarity (SSIM) adaptive threshold, and then uses a convolutional neural network (CNN) to extract features, focusing on human body movements, and finally determines the key frame extraction method of the key frame sequence according to information entropy (Image Entropy).

[0006] The technical solution of the present invention is as follows:

[0007] 1. A video key frame extraction method based on adaptive grouping and feature map information entropy

[0008] Step 1: Segment the selected video into video frame sequences according to the frame rate of the video itself;

[0009] Step 2: Calculate the structural similarity between two adjacent frames in the video frame sequence to obtain the similarity sequence of the current video;

[0010] Step 3: Calculate the adaptive threshold using the similarity sequence, group the video frame sequence according to the adaptive threshold, and obtain several image groups of the current video;

[0011] Step 4: Combine the feature map information entropy to extract the key frames of each image group respectively, so as to obtain all the key frames of the current video and complete the extraction of the video key frames.

[0012] In step 3, the adaptive threshold is calculated using the similarity sequence, specifically:

[0013] The mean, median and standard deviation of the structural similarity are calculated based on the similarity sequence of the current video, and then the adaptive threshold is calculated using the following formula:

[0014]

[0015] Among them, m represents the median, σ represents the standard deviation, μ represents the mean, and T represents the adaptive threshold.

[0016] In step 3, the video frame sequence is grouped according to the adaptive threshold to obtain several image groups of the current video, specifically:

[0017] Each frame in the video frame sequence whose structural similarity is less than the adaptive threshold is taken as an image group, and continuous frames in the video frame sequence whose structural similarity is greater than or equal to the adaptive threshold are taken as an image group, and the number of frames in each image group does not exceed the preset maximum number of frames.

[0018] The preset maximum frame number is 5-10.

[0019] In step 4, if each image group contains only one frame, then the frame is used as the key frame of the image group; if each image group contains multiple frames, the feature maps corresponding to each frame in the current image group are extracted, and then the information entropy of each feature map is calculated, and the frame with the largest information entropy in the current image group is used as the key frame of the current image group.

[0020] In step 4, a convolutional neural network is used to extract a feature map of each frame.

[0021] 2. A computer device

[0022] The device comprises a memory and a processor, wherein the memory stores a computer program, and the steps of the method are implemented when the processor executes the computer program.

[0023] 3. A computer-readable storage medium

[0024] The medium stores a computer program, which implements the steps of the method when executed by a processor.

[0025] IV. A COMPUTER PROGRAM PRODUCT

[0026] The product comprises a computer program / instructions which, when executed by a processor, implement the steps of the method.

[0027] The beneficial effects of the present invention are as follows:

[0028] 1. The present invention proposes to use the characteristics of feature maps to extract key frames, remove redundant information, and is more targeted at action recognition tasks.

[0029] 2. The present invention adopts a method combining SSIM and information entropy to greatly improve the accuracy of key frame extraction. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 Flow chart of the method of the present invention.

[0031] Figure 2 Schematic diagram of video frame segmentation according to the present invention.

[0032] Figure 3 Schematic diagram of video frame grouping according to the present invention.

[0033] Figure 4 It is a structural diagram of the SSIM method in the present invention.

[0034] Figure 5 A schematic diagram of obtaining the SSIM value of a video frame according to the present invention.

[0035] Figure 6 This is a bar chart after grouping according to the adaptive threshold in the present invention.

[0036] Figure 7 A bar graph showing the number of video frames in each group in a complete video of the present invention.

[0037] Figure 8 A result graph of the information entropy of a feature graph in a group is obtained for the present invention. DETAILED DESCRIPTION

[0038] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0039] The present invention is mainly aimed at the key frame extraction method designed for action recognition tasks. Since the recognition object of the present invention is a video action sequence, the UCF101 dataset is selected. The original video dataset is more difficult for model training in action recognition. Therefore, it is very necessary to extract key frames for this type of dataset.

[0040] The structure diagram of the key frame extraction method based on adaptive grouping and feature map information entropy is as follows: Figure 1 As shown in the figure. First, the video is divided into video frame sequences according to the frame rate (fps), and the SSIM method is used to calculate the similarity value between two adjacent frames. Then, an adaptive similarity threshold is calculated for grouping based on the structural characteristics of the similarity value list. Then, the video frame sequence is grouped according to the threshold, and finally the key frame in each group is obtained through the feature map information entropy of the video frame. Finally, the key frame of the video can be obtained.

[0041] The specific steps of the present invention are as follows:

[0042] Step 1: First, initialize the action video, such as Figure 2 As shown, the selected action video is segmented into video frame sequences according to the frame rate (fps) of the video information itself for subsequent processing.

[0043] Step 2: SSIM is an indicator used to measure the similarity between two images. Figure 3 As shown in the figure, it considers brightness, contrast and structure, and evaluates their overall similarity by comparing the local similarity of images. In video processing, SSIM is often used to compare the similarity between video frames. Use the structural_similarity function in the skimage library to calculate the structural similarity SSIM between two adjacent frames in a video frame sequence, so as to obtain the similarity sequence of the current video, as shown in the figure. Figure 4 As shown;

[0044] Step 3: Calculate the adaptive threshold using the similarity sequence, group the video frame sequence according to the adaptive threshold, and obtain several image groups of the current video;

[0045] Among them, the adaptive threshold is calculated using the similarity sequence, specifically:

[0046] The mean, median and standard deviation of the structural similarity are calculated based on the similarity sequence of the current video, and then the adaptive threshold is calculated using the following formula:

[0047]

[0048] Among them, m represents the median, σ represents the standard deviation, μ represents the mean, and T represents the adaptive threshold.

[0049] Since the median is an indicator of the central tendency of the distribution, it better represents the concentration characteristics of the overall distribution than the mean. When the similarity value distribution is relatively concentrated, the median minus 0.3 times the standard deviation can set the threshold in a higher similarity range. When the similarity value distribution is relatively scattered, the mean minus 0.5 times the standard deviation can set the threshold in a lower similarity range.

[0050] The video frame sequence is grouped according to the adaptive threshold to obtain several image groups of the current video, specifically:

[0051] Each frame in the video frame sequence whose structural similarity is less than the adaptive threshold is taken as an image group, and the continuous frames in the video frame sequence whose structural similarity is greater than or equal to the adaptive threshold are taken as an image group. In order to ensure that video frames that are far apart are not assigned to the same group, that is, to ensure that the similarity of the first frame and the last frame in the same group is not much different, a hyperparameter is defined to constrain the maximum value of the grouping, and the number of frames in each image group does not exceed the preset maximum number of frames. In the specific implementation, the preset maximum number of frames ranges from 5 to 10.

[0052] Grouping operations such as Figure 5 As shown in the figure, a video is randomly selected and the threshold is calculated to be 0.772. The first 33 video frames are grouped. The grouped results are as follows Figure 6 Column chart shown. Figure 7 The diagram is a schematic diagram of grouping the entire video. From the diagram, it can be seen that the similarity of the first part of the video frames is low, and most of the video frames in the middle have continuous similarities greater than the threshold, so each group is limited to 7 video frames.

[0053] Information entropy is an indicator to measure the amount of information in an image. In image processing, information entropy can be used to evaluate the complexity or information richness of an image. Generally speaking, the higher the information entropy, the richer the information contained in the image.

[0054] Step 4: Combine the feature map information entropy to extract the key frames of each image group, so as to obtain all the key frames of the current video and record the corresponding serial numbers to complete the extraction of video key frames. If you need to extract video key frames for other action videos in the entire action recognition dataset, repeat steps 1 to 4 and store the extracted video frames in a folder with the same file structure.

[0055] If each image group contains only one frame, then this frame is used as the key frame of the image group; if each image group contains multiple frames, a convolutional neural network is used to extract the feature maps corresponding to each frame in the current image group. It is not used for classification, but only for extracting image features, focusing on people, removing most of the redundant information, and making the extracted key frames more suitable for action recognition. The size of the image information entropy represents the richness of the image content. Then calculate the information entropy of each feature map, such as Figure 8 As shown in the figure, the frame with the largest information entropy in the current image group is used as the key frame of the current image group.

[0056] Five videos from the UCF101 dataset are used for experiments. As can be seen from Table 1, the average compression ratio of the method is 81.72%. From the experiment, it can be seen that representative key frames can be accurately and semantically extracted from long video sequences or videos with many transitions, objectively reflecting the video content. Figure 7 The bar chart shown can better demonstrate the superiority of the method.

[0057] Table 1 is a test table of multiple videos

[0058]

[0059] The above-mentioned specific technical process is used to explain the present invention rather than to limit the present invention. Any modification and change made to the present invention within the spirit of the present invention and the protection scope of the claims shall fall within the protection scope of the present invention.

Claims

1. A video key frame extraction method based on adaptive grouping and feature map information entropy, characterized in that: The following steps are involved: Step 1: Segment the selected video into video frame sequences according to the frame rate of the video itself; Step 2: Calculate the structural similarity between two adjacent frames in the video frame sequence to obtain the similarity sequence of the current video; Step 3: Calculate the adaptive threshold using the similarity sequence, group the video frame sequence according to the adaptive threshold, and obtain several image groups of the current video; Step 4: Combine the feature map information entropy to extract the key frames of each image group respectively, so as to obtain all the key frames of the current video and complete the extraction of the video key frames.

2. The video key frame extraction method based on adaptive grouping and feature map information entropy according to claim 1, characterized in that: In step 3, the adaptive threshold is calculated using the similarity sequence, specifically: The mean, median and standard deviation of the structural similarity are calculated based on the similarity sequence of the current video, and then the adaptive threshold is calculated using the following formula: Among them, m represents the median, σ represents the standard deviation, μ represents the mean, and T represents the adaptive threshold.

3. The video key frame extraction method based on adaptive grouping and feature map information entropy according to claim 1, characterized in that: In step 3, the video frame sequence is grouped according to the adaptive threshold to obtain several image groups of the current video, specifically: Each frame in the video frame sequence whose structural similarity is less than the adaptive threshold is taken as an image group, and continuous frames in the video frame sequence whose structural similarity is greater than or equal to the adaptive threshold are taken as an image group, and the number of frames in each image group does not exceed the preset maximum number of frames.

4. The video key frame extraction method based on adaptive grouping and feature map information entropy according to claim 3 is characterized in that: The preset maximum frame number is 5-10.

5. The video key frame extraction method based on adaptive grouping and feature map information entropy according to claim 1, characterized in that: In step 4, if each image group contains only one frame, then the frame is used as the key frame of the image group; if each image group contains multiple frames, the feature maps corresponding to each frame in the current image group are extracted, and then the information entropy of each feature map is calculated, and the frame with the largest information entropy in the current image group is used as the key frame of the current image group.

6. The method for extracting video key frames based on adaptive grouping and feature map information entropy according to claim 5, characterized in that: In step 4, a convolutional neural network is used to extract a feature map of each frame.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.