├── .gitignore ├── Bag.py ├── KMeans.py ├── LICENSE ├── README.md ├── figure_1.png ├── helpers.py ├── images ├── test │ ├── Soccer_Ball │ │ ├── image_0032.jpg │ │ └── image_0046.jpg │ ├── accordian │ │ ├── image_0023.jpg │ │ └── image_0026.jpg │ ├── dollar_bill │ │ ├── image_0040.jpg │ │ └── image_0048.jpg │ └── motorbike │ │ ├── image_0030.jpg │ │ └── image_0044.jpg └── train │ ├── Soccer_Ball │ ├── image_0011.jpg │ ├── image_0012.jpg │ ├── image_0013.jpg │ ├── image_0014.jpg │ ├── image_0015.jpg │ ├── image_0016.jpg │ ├── image_0018.jpg │ ├── image_0021.jpg │ ├── image_0022.jpg │ ├── image_0024.jpg │ ├── image_0025.jpg │ ├── image_0027.jpg │ ├── image_0028.jpg │ └── image_0029.jpg │ ├── accordion │ ├── image_0001.jpg │ ├── image_0002.jpg │ ├── image_0003.jpg │ ├── image_0007.jpg │ ├── image_0008.jpg │ ├── image_0009.jpg │ ├── image_0010.jpg │ ├── image_0011.jpg │ ├── image_0012.jpg │ ├── image_0013.jpg │ ├── image_0014.jpg │ ├── image_0016.jpg │ ├── image_0018.jpg │ └── image_0021.jpg │ ├── dollar_bill │ ├── image_0001.jpg │ ├── image_0002.jpg │ ├── image_0003.jpg │ ├── image_0007.jpg │ ├── image_0008.jpg │ ├── image_0009.jpg │ ├── image_0010.jpg │ ├── image_0011.jpg │ ├── image_0012.jpg │ ├── image_0013.jpg │ ├── image_0014.jpg │ ├── image_0015.jpg │ ├── image_0016.jpg │ └── image_0018.jpg │ └── motorbike │ ├── image_0001.jpg │ ├── image_0002.jpg │ ├── image_0003.jpg │ ├── image_0004.jpg │ ├── image_0007.jpg │ ├── image_0008.jpg │ ├── image_0009.jpg │ ├── image_0010.jpg │ ├── image_0011.jpg │ ├── image_0012.jpg │ ├── image_0013.jpg │ ├── image_0014.jpg │ ├── image_0015.jpg │ └── image_0016.jpg ├── readme_im ├── ac1.png ├── bk1.png ├── bk2.png ├── dollar1.png ├── normalized_7.png └── sbb3.png ├── vocab.png └── vocab_unnormalized.png /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | 3 | -------------------------------------------------------------------------------- /Bag.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | from glob import glob 4 | import argparse 5 | from helpers import * 6 | from matplotlib import pyplot as plt 7 | 8 | 9 | class BOV: 10 | def __init__(self, no_clusters): 11 | self.no_clusters = no_clusters 12 | self.train_path = None 13 | self.test_path = None 14 | self.im_helper = ImageHelpers() 15 | self.bov_helper = BOVHelpers(no_clusters) 16 | self.file_helper = FileHelpers() 17 | self.images = None 18 | self.trainImageCount = 0 19 | self.train_labels = np.array([]) 20 | self.name_dict = {} 21 | self.descriptor_list = [] 22 | 23 | def trainModel(self): 24 | """ 25 | This method contains the entire module 26 | required for training the bag of visual words model 27 | 28 | Use of helper functions will be extensive. 29 | 30 | """ 31 | 32 | # read file. prepare file lists. 33 | self.images, self.trainImageCount = self.file_helper.getFiles(self.train_path) 34 | # extract SIFT Features from each image 35 | label_count = 0 36 | for word, imlist in self.images.iteritems(): 37 | self.name_dict[str(label_count)] = word 38 | print "Computing Features for ", word 39 | for im in imlist: 40 | # cv2.imshow("im", im) 41 | # cv2.waitKey() 42 | self.train_labels = np.append(self.train_labels, label_count) 43 | kp, des = self.im_helper.features(im) 44 | self.descriptor_list.append(des) 45 | 46 | label_count += 1 47 | 48 | 49 | # perform clustering 50 | bov_descriptor_stack = self.bov_helper.formatND(self.descriptor_list) 51 | self.bov_helper.cluster() 52 | self.bov_helper.developVocabulary(n_images = self.trainImageCount, descriptor_list=self.descriptor_list) 53 | 54 | # show vocabulary trained 55 | # self.bov_helper.plotHist() 56 | 57 | 58 | self.bov_helper.standardize() 59 | self.bov_helper.train(self.train_labels) 60 | 61 | 62 | def recognize(self,test_img, test_image_path=None): 63 | 64 | """ 65 | This method recognizes a single image 66 | It can be utilized individually as well. 67 | 68 | 69 | """ 70 | 71 | kp, des = self.im_helper.features(test_img) 72 | # print kp 73 | print des.shape 74 | 75 | # generate vocab for test image 76 | vocab = np.array( [[ 0 for i in range(self.no_clusters)]]) 77 | # locate nearest clusters for each of 78 | # the visual word (feature) present in the image 79 | 80 | # test_ret =<> return of kmeans nearest clusters for N features 81 | test_ret = self.bov_helper.kmeans_obj.predict(des) 82 | # print test_ret 83 | 84 | # print vocab 85 | for each in test_ret: 86 | vocab[0][each] += 1 87 | 88 | print vocab 89 | # Scale the features 90 | vocab = self.bov_helper.scale.transform(vocab) 91 | 92 | # predict the class of the image 93 | lb = self.bov_helper.clf.predict(vocab) 94 | # print "Image belongs to class : ", self.name_dict[str(int(lb[0]))] 95 | return lb 96 | 97 | 98 | 99 | def testModel(self): 100 | """ 101 | This method is to test the trained classifier 102 | 103 | read all images from testing path 104 | use BOVHelpers.predict() function to obtain classes of each image 105 | 106 | """ 107 | 108 | self.testImages, self.testImageCount = self.file_helper.getFiles(self.test_path) 109 | 110 | predictions = [] 111 | 112 | for word, imlist in self.testImages.iteritems(): 113 | print "processing " ,word 114 | for im in imlist: 115 | # print imlist[0].shape, imlist[1].shape 116 | print im.shape 117 | cl = self.recognize(im) 118 | print cl 119 | predictions.append({ 120 | 'image':im, 121 | 'class':cl, 122 | 'object_name':self.name_dict[str(int(cl[0]))] 123 | }) 124 | 125 | print predictions 126 | for each in predictions: 127 | # cv2.imshow(each['object_name'], each['image']) 128 | # cv2.waitKey() 129 | # cv2.destroyWindow(each['object_name']) 130 | # 131 | plt.imshow(cv2.cvtColor(each['image'], cv2.COLOR_GRAY2RGB)) 132 | plt.title(each['object_name']) 133 | plt.show() 134 | 135 | 136 | def print_vars(self): 137 | pass 138 | 139 | 140 | if __name__ == '__main__': 141 | 142 | # parse cmd args 143 | parser = argparse.ArgumentParser( 144 | description=" Bag of visual words example" 145 | ) 146 | parser.add_argument('--train_path', action="store", dest="train_path", required=True) 147 | parser.add_argument('--test_path', action="store", dest="test_path", required=True) 148 | 149 | args = vars(parser.parse_args()) 150 | print args 151 | 152 | 153 | bov = BOV(no_clusters=100) 154 | 155 | # set training paths 156 | bov.train_path = args['train_path'] 157 | # set testing paths 158 | bov.test_path = args['test_path'] 159 | # train the model 160 | bov.trainModel() 161 | # test model 162 | bov.testModel() 163 | -------------------------------------------------------------------------------- /KMeans.py: -------------------------------------------------------------------------------- 1 | """ 2 | Using SKLearns API for performing Kmeans clustering. 3 | Using sklearn.datasets.make_blobs for generating randomized gaussians 4 | for clustering. 5 | 6 | """ 7 | 8 | import numpy as np 9 | from matplotlib import pyplot as plt 10 | from sklearn.cluster import KMeans 11 | from sklearn.datasets import make_blobs 12 | 13 | # create a dataset sample space that will be used 14 | # to test KMeans. Use function : make_blobs 15 | # 16 | 17 | n_samples = 1000 18 | n_features = 5; 19 | n_clusters = 3; 20 | 21 | # aint this sweet 22 | X, y = make_blobs(n_samples, n_features) 23 | # X => array of shape [nsamples,nfeatures] ;;; y => array of shape[nsamples] 24 | 25 | # X : generated samples, y : integer labels for cluster membership of each sample 26 | # 27 | # 28 | 29 | # performing KMeans clustering 30 | 31 | ret = KMeans(n_clusters = n_clusters).fit_predict(X) 32 | print ret 33 | 34 | __, ax = plt.subplots(2) 35 | ax[0].scatter(X[:,0], X[:,1]) 36 | ax[0].set_title("Initial Scatter Distribution") 37 | ax[1].scatter(X[:,0], X[:,1], c=ret) 38 | ax[1].set_title("Colored Partition denoting Clusters") 39 | # plt.scatter 40 | plt.show() 41 | 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 kushalvyas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bag-of-Visual-Words-Python # 2 | # This repo is no longer maintained 3 | ### This repository has been archived. It's just for learning purposes and will not be fixing issues / versioning / accepting PRs. Thanks for viewing the code / blog post! 4 | 5 | This is a python implementation of the Bag of Visual Words model. [Be sure to check it out on my blog](http://kushalvyas.github.io/BOV.html#BOV) 6 | 7 | Project Architecture : 8 | 9 | :::python 10 | - root dir/ 11 | |- images/ 12 | |- test / 13 | |- obj1/ 14 | |- obj2/ 15 | 16 | |- train / 17 | |- obj1/ 18 | |- obj2/ 19 | 20 | |- helpers.py 21 | |- Bag.py 22 | 23 | 24 | :~$ python Bag.py --train_path images/train/ --test_path images/test/ 25 | 26 | 27 | 28 | ### Output 29 | 30 | ![im1](readme_im/ac1.png) 31 | ![im2](readme_im/bk1.png) 32 | ![im3](readme_im/bk2.png) 33 | ![im4](readme_im/dollar1.png) 34 | ![im5](readme_im/sbb3.png) 35 | ![im5](readme_im/normalized_7.png) 36 | 37 | 38 | 39 | NOTE: I've added the MIT LICENSE to the repo. Anyone is free to use this code in accordance with the MIT LICENSE 40 | -------------------------------------------------------------------------------- /figure_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/figure_1.png -------------------------------------------------------------------------------- /helpers.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | from glob import glob 4 | from sklearn.cluster import KMeans 5 | from sklearn.svm import SVC 6 | from sklearn.preprocessing import StandardScaler 7 | from matplotlib import pyplot as plt 8 | 9 | class ImageHelpers: 10 | def __init__(self): 11 | self.sift_object = cv2.xfeatures2d.SIFT_create() 12 | 13 | def gray(self, image): 14 | gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) 15 | return gray 16 | 17 | def features(self, image): 18 | keypoints, descriptors = self.sift_object.detectAndCompute(image, None) 19 | return [keypoints, descriptors] 20 | 21 | 22 | class BOVHelpers: 23 | def __init__(self, n_clusters = 20): 24 | self.n_clusters = n_clusters 25 | self.kmeans_obj = KMeans(n_clusters = n_clusters) 26 | self.kmeans_ret = None 27 | self.descriptor_vstack = None 28 | self.mega_histogram = None 29 | self.clf = SVC() 30 | 31 | def cluster(self): 32 | """ 33 | cluster using KMeans algorithm, 34 | 35 | """ 36 | self.kmeans_ret = self.kmeans_obj.fit_predict(self.descriptor_vstack) 37 | 38 | def developVocabulary(self,n_images, descriptor_list, kmeans_ret = None): 39 | 40 | """ 41 | Each cluster denotes a particular visual word 42 | Every image can be represeted as a combination of multiple 43 | visual words. The best method is to generate a sparse histogram 44 | that contains the frequency of occurence of each visual word 45 | 46 | Thus the vocabulary comprises of a set of histograms of encompassing 47 | all descriptions for all images 48 | 49 | """ 50 | 51 | self.mega_histogram = np.array([np.zeros(self.n_clusters) for i in range(n_images)]) 52 | old_count = 0 53 | for i in range(n_images): 54 | l = len(descriptor_list[i]) 55 | for j in range(l): 56 | if kmeans_ret is None: 57 | idx = self.kmeans_ret[old_count+j] 58 | else: 59 | idx = kmeans_ret[old_count+j] 60 | self.mega_histogram[i][idx] += 1 61 | old_count += l 62 | print "Vocabulary Histogram Generated" 63 | 64 | def standardize(self, std=None): 65 | """ 66 | 67 | standardize is required to normalize the distribution 68 | wrt sample size and features. If not normalized, the classifier may become 69 | biased due to steep variances. 70 | 71 | """ 72 | if std is None: 73 | self.scale = StandardScaler().fit(self.mega_histogram) 74 | self.mega_histogram = self.scale.transform(self.mega_histogram) 75 | else: 76 | print "STD not none. External STD supplied" 77 | self.mega_histogram = std.transform(self.mega_histogram) 78 | 79 | def formatND(self, l): 80 | """ 81 | restructures list into vstack array of shape 82 | M samples x N features for sklearn 83 | 84 | """ 85 | vStack = np.array(l[0]) 86 | for remaining in l[1:]: 87 | vStack = np.vstack((vStack, remaining)) 88 | self.descriptor_vstack = vStack.copy() 89 | return vStack 90 | 91 | def train(self, train_labels): 92 | """ 93 | uses sklearn.svm.SVC classifier (SVM) 94 | 95 | 96 | """ 97 | print "Training SVM" 98 | print self.clf 99 | print "Train labels", train_labels 100 | self.clf.fit(self.mega_histogram, train_labels) 101 | print "Training completed" 102 | 103 | def predict(self, iplist): 104 | predictions = self.clf.predict(iplist) 105 | return predictions 106 | 107 | def plotHist(self, vocabulary = None): 108 | print "Plotting histogram" 109 | if vocabulary is None: 110 | vocabulary = self.mega_histogram 111 | 112 | x_scalar = np.arange(self.n_clusters) 113 | y_scalar = np.array([abs(np.sum(vocabulary[:,h], dtype=np.int32)) for h in range(self.n_clusters)]) 114 | 115 | print y_scalar 116 | 117 | plt.bar(x_scalar, y_scalar) 118 | plt.xlabel("Visual Word Index") 119 | plt.ylabel("Frequency") 120 | plt.title("Complete Vocabulary Generated") 121 | plt.xticks(x_scalar + 0.4, x_scalar) 122 | plt.show() 123 | 124 | class FileHelpers: 125 | 126 | def __init__(self): 127 | pass 128 | 129 | def getFiles(self, path): 130 | """ 131 | - returns a dictionary of all files 132 | having key => value as objectname => image path 133 | 134 | - returns total number of files. 135 | 136 | """ 137 | imlist = {} 138 | count = 0 139 | for each in glob(path + "*"): 140 | word = each.split("/")[-1] 141 | print " #### Reading image category ", word, " ##### " 142 | imlist[word] = [] 143 | for imagefile in glob(path+word+"/*"): 144 | print "Reading file ", imagefile 145 | im = cv2.imread(imagefile, 0) 146 | imlist[word].append(im) 147 | count +=1 148 | 149 | return [imlist, count] 150 | 151 | -------------------------------------------------------------------------------- /images/test/Soccer_Ball/image_0032.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/test/Soccer_Ball/image_0032.jpg -------------------------------------------------------------------------------- /images/test/Soccer_Ball/image_0046.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/test/Soccer_Ball/image_0046.jpg -------------------------------------------------------------------------------- /images/test/accordian/image_0023.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/test/accordian/image_0023.jpg -------------------------------------------------------------------------------- /images/test/accordian/image_0026.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/test/accordian/image_0026.jpg -------------------------------------------------------------------------------- /images/test/dollar_bill/image_0040.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/test/dollar_bill/image_0040.jpg -------------------------------------------------------------------------------- /images/test/dollar_bill/image_0048.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/test/dollar_bill/image_0048.jpg -------------------------------------------------------------------------------- /images/test/motorbike/image_0030.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/test/motorbike/image_0030.jpg -------------------------------------------------------------------------------- /images/test/motorbike/image_0044.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/test/motorbike/image_0044.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0011.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0011.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0012.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0012.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0013.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0013.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0014.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0014.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0015.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0015.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0016.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0016.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0018.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0018.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0021.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0021.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0022.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0022.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0024.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0024.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0025.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0025.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0027.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0027.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0028.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0028.jpg -------------------------------------------------------------------------------- /images/train/Soccer_Ball/image_0029.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/Soccer_Ball/image_0029.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0001.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0002.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0003.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0007.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0007.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0008.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0008.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0009.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0009.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0010.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0011.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0011.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0012.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0012.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0013.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0013.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0014.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0014.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0016.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0016.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0018.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0018.jpg -------------------------------------------------------------------------------- /images/train/accordion/image_0021.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/accordion/image_0021.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0001.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0002.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0003.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0007.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0007.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0008.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0008.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0009.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0009.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0010.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0011.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0011.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0012.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0012.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0013.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0013.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0014.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0014.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0015.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0015.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0016.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0016.jpg -------------------------------------------------------------------------------- /images/train/dollar_bill/image_0018.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/dollar_bill/image_0018.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0001.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0002.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0003.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0004.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0007.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0007.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0008.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0008.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0009.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0009.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0010.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0011.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0011.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0012.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0012.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0013.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0013.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0014.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0014.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0015.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0015.jpg -------------------------------------------------------------------------------- /images/train/motorbike/image_0016.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/images/train/motorbike/image_0016.jpg -------------------------------------------------------------------------------- /readme_im/ac1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/readme_im/ac1.png -------------------------------------------------------------------------------- /readme_im/bk1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/readme_im/bk1.png -------------------------------------------------------------------------------- /readme_im/bk2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/readme_im/bk2.png -------------------------------------------------------------------------------- /readme_im/dollar1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/readme_im/dollar1.png -------------------------------------------------------------------------------- /readme_im/normalized_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/readme_im/normalized_7.png -------------------------------------------------------------------------------- /readme_im/sbb3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/readme_im/sbb3.png -------------------------------------------------------------------------------- /vocab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/vocab.png -------------------------------------------------------------------------------- /vocab_unnormalized.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushalvyas/Bag-of-Visual-Words-Python/8ddda6ab804f14777855c8f4119f749f61e2da6e/vocab_unnormalized.png --------------------------------------------------------------------------------