Abstract
With the development of science and technology, more and more images need to be recognized and categorized. Although the classical Bag of Words (BoW) model has played a great role in the past, there are still many limitations about it, i.e. low precision and accuracy, high complexity of computation, etc. In this paper, it is improved and extended from four ways. Firstly, the features filtered from the background are sampled to reduce the influence of background noise. Secondly, the spatial relationship among all features is integrated with the classical BoW vector to improve the accuracy of recognition and categorization. Thirdly, vocabulary tree is constructed by applying hierarchical K mean value, in order to obtain more reasonable vocabulary list and greatly reduce the clustering time. Fourthly, a weighted visual word histogram is considered, in order to stand out the essential difference among images. At last, some experiments are conducted to show the advantage of the proposed method.
Introduction
The classical Bag of Words (BoW) model, originally borrowed from text retrieval, treats an image like a "bag" of visual features. While effective, it has a major blind spot: it ignores the spatial arrangement of those features. To a standard BoW model, a picture of a face and a picture of a face with the eyes and mouth swapped might look identical because the "count" of features remains the same. Furthermore, BoW models often struggle with background noise—features from the floor or sky that aren't part of the target object—and suffer from high computational costs when clustering thousands of high-dimensional descriptors into a usable visual vocabulary.
Proposed Methodology
To address these limitations, the authors propose the Spatial Bag of Words (SBoW) model, which incorporates four key improvements.
1. Background Filtering
The model uses a RANSAC-based iterative sampling method to identify the densest cluster of features in an image. By assuming the object of interest has a higher feature density than the background, the algorithm filters out noise, focusing only on valid object features. This process involves iteratively selecting feature points to define a circle that encompasses the primary object structure.
2. Spatial Relationship Integration
Instead of just counting features, SBoW calculates the geometric center of the detected object. It then quantizes the distance and angle of every feature relative to that center. Specifically, the distance is quantized into 4 zones and the angle into 5 zones. This adds a "spatial signature" to the final feature vector, making the model invariant to scale and rotation while preserving internal geometry.
3. Hierarchical K-means (HKm) Vocabulary Tree
Rather than using a flat, slow K-means clustering to build a visual dictionary, the authors utilize a tree-based hierarchical approach. This hierarchical K-means (HKm) method drastically reduces the time needed to categorize new features and build the visual vocabulary, especially as the number of feature points increases.
4. TF-IDF Weighting
Borrowing from linguistics, the model applies "Term Frequency-Inverse Document Frequency" (TF-IDF) weighting. This ensures that common, non-descriptive visual words (the visual equivalent of "the" or "and") are downweighted, while rare, highly descriptive features are emphasized in the final histogram.
Experimental Results
The researchers evaluated their model using benchmark datasets including Caltech-256 and VOC 2007, focusing on categories like motorbikes, cars, human faces, and airplanes.
- Accuracy Boost: SBoW achieved the highest accuracy across all categories. In the Motorbike category, SBoW reached 95% accuracy, compared to 91% for BoW+HKm and only 80% for the classical BoW.
- Recall Improvement: Results showed a roughly 5% improvement in recall over classical methods, indicating the system is better at identifying objects in difficult or cluttered images.
- Efficiency: The HKm vocabulary tree significantly reduced computational overhead compared to standard K-means clustering.
Conclusion
The SBoW model successfully evolves the classical BoW approach by integrating spatial distribution as a proxy for object structure. By combining background filtering, spatial quantization, hierarchical clustering, and TF-IDF weighting, the authors provide a robust framework for visual recognition that is both more accurate and more efficient than its predecessors.
Summary updated