Xiaohe Xue Jan 14th, 2016
This project is a rewritten version of Searching Images project in Chapter 7 in the book-Programming Computer Vision. This project has a simple but integrated ability of content based image retrieval. This project has five parts, creating vocabulary, indexing the image, searching in the database, ranking the images and using in web demo.
###Creating Vocabulary (Vocabulary)
-
Property
attribute Type DECR name string name of vocabulary voc list visual words, content of voc idf list idf value of every visual word trainingdata list path of sift file of every image nor_word int number of visual words -
Function
-
train(self, featurefiles, k, subsampling)
to create vocabulary. First read all the sift files of every image. Second, calculate the visual words by using k-means clustering.
Finally, go through all training images and project on vocabulary.
-
project(self, descriptors)
to create the histogram of every visual word
-
-
Database Tables
-
imlist
type name descr string file image path -
imwords
type name descr int imid image id int wordid visual id string vocname vocabulary name -
imhistograms
type name descr int imid image id histogram pickle histogram value in pickle vocname string voc name
-
show two different ways to rank the images, one is regular way, another is in homography way
the ranking functions need to be improved
use basic inverted list which use visual words as primary element to implete searching the image retrieval.
use flask web framework
- need to use tf-idf
-
PCV
-
pysqlite2
-
pickle
-
PIL
-
numpy
-
pylab
-
scipy
-
vlfeat commad lines (shell not python modlues)
-
sqlite (databse)