Searching for video content using text keywords is a mature technology, yet retrieving video segments based on a query image remains a significant technical hurdle. Traditional approaches often rely on computationally expensive frame-by-frame comparisons or ignore the inherent temporal structure of video data. Researchers at PES University have proposed a novel framework that models video frame clusters as nodes in a graph, capturing temporal "flow" to enhance both retrieval accuracy and scalability.
The Challenge of Image-to-Video Retrieval
Image-to-video retrieval faces two primary obstacles: scalability and the loss of temporal context.
- Scalability: Comparing a single query image against every frame in a large-scale video database is inefficient and does not scale to real-world applications.
- Temporal Context: A video is more than a collection of independent images; the sequence and transitions between frames provide critical semantic information. Standard image-matching techniques treat videos as "bags of images," failing to leverage the natural progression of visual states.
Proposed Methodology
The proposed system utilizes a multi-stage pipeline designed to bridge the gap between static image features and dynamic temporal data.
Feature Extraction and Clustering
Videos are first sampled at a rate of 2 frames per second. Each frame is processed through a pre-trained Deep Residual Network (ResNet-50 or ResNet-152) to produce a 2048-dimensional embedding. To manage the search space, these embeddings are grouped into 175 clusters using K-Nearest Neighbors (K-NN), with each cluster represented by its mean embedding.
Graph Construction and Temporal Aggregation
The core innovation lies in the construction of an undirected graph where nodes represent clusters. An edge is established between two clusters if a video contains a frame from one cluster immediately followed by a frame from the other. The weight of these edges reflects the frequency of such transitions.
Inspired by GraphSAGE, the system performs temporal aggregation by updating cluster embeddings with information from their first-order neighbors in the graph. This process effectively "bakes" temporal transition context directly into the visual feature vectors, allowing the model to understand that certain visual states (e.g., a pitcher's wind-up) are temporally linked to others (e.g., the ball being released).
Dataset and Experimental Setup
The researchers evaluated their approach using a modified version of the MSR-VTT (Multimedia State-of-the-Art Video to Text) dataset. The original dataset contains approximately 2,990 videos across 20 categories.
To ensure visual distinctness for the image-query task, the authors merged similar categories (e.g., "Food" and "Cooking") and removed ambiguous ones (e.g., "TV Shows"), resulting in a refined set of 11 categories as shown in the distribution above.
Results and Discussion
The experimental results highlight the advantages of graph-based temporal modeling:
- Model Comparison: ResNet-152 consistently outperformed ResNet-50 in Mean Average Precision (mAP), benefiting from its deeper architecture and ability to capture complex features.
- The Graph Advantage: The graph-based method showed superior mAP compared to simple clustering without temporal aggregation. In the "Sports/Actions" category, the model achieved a remarkable mAP@5 of 100% and mAP@10 of 97.5%.
- Efficiency: The system demonstrated high scalability, with the ResNet-50 model reaching a search speed of 18,000 frames per second and the ResNet-152 model achieving 15,000 frames per second.
Conclusion and Future Work
By treating temporal transitions as edges in a cluster graph, this research provides a scalable and context-aware solution for image-to-video retrieval. Future work may explore the use of localized graphs for individual videos to improve scalability in dynamic databases and the application of this method to long-form video content. Additionally, domain-specific pre-training for feature extractors could further enhance performance in complex visual categories.
Summary updated