:school_satchel: Bag of Visual words (BoW) approach for object classification and detection in images together with SIFT feature extractor and SVM classifier.
An example of a typical bag of words classification pipeline refer to content based image classifier using the bag of visual words model in C++ with OpenCV.
Bag of words models are a popular technique for image classification inspired by models used in natural language processing (NLP). The model ignores or downplays word arrangement (spatial information in the image) and classifies based on a histogram of the frequency of visual words. The visual word "vocabulary" is established by clustering a large corpus of local features. See Szeliski chapter 14.4.1 for more details on category recognition with quantized features. In addition, 14.3.2 discusses vocabulary creation and 14.1 covers classification techniques.
The program will generate a visual vocabulary and train a classifier using a user provided set of already classified images. After the learning phase, we will use the generated vocabulary and the trained classifier to predict the class for any image given to the script by the user.
The learning consists of:
This code relies on:
The example dataset used in this project is Caltech 101 dataset.
Example images from of each category of Caltech 101.
Copyright (c) 2018 Hadi Abdi Khojasteh
GNU General Public License v3.0