Keyframe Extraction Based on Large Vision Transformer Model and kNN-DBSCAN Clustering
摘要
KeyFrame extraction is an essential task in various multimedia applications, including video summarization, content analysis, and video browsing. With the rapid advancements in Deep learning, particularly the development of Large vision models such as contrastive language image pre-training (CLIP), new opportunities have emerged to leverage these powerful models in KeyFrame extraction systems. This research presents a potential approach named ViTKDB that combines traditional machine learning techniques with state-of-the-art Deep learning models to extract a diverse and representative set of keyframes from videos. The proposed pipeline comprises four main steps: (1) Shot segmentation, where the input video is divided into distinct shots using the Transnetv2 model; (2) Feature extraction, where CLIP is utilized to extract high-level semantic features from the frames within each shot; (3) Adaptive clustering, which uses DBSCAN algorithm with an estimated neighborhood radius based on k-nearest neighbors (kNN) to group similar frames and (4) Keyframe de-duplication process, which eliminates redundant frames by analyzing histogram similarity. By leveraging the strong image understanding capabilities of CLIP, our approach can capture the semantic similarities between frames, enabling the selection of keyframes that best represent the visual content and context of the video. Furthermore, the adaptive clustering technique allows for flexible and accurate grouping of frames, while the Keyframe de-duplication process ensures a diverse and non-redundant set of frames. Experiments conducted on a benchmark dataset demonstrate the effectiveness of our approach in keyframe extraction, outperforming traditional keyframe extraction methods. This system can have potential applications in various domains, including video summarization, content-based video retrieval, and video editing tools.