Skip to content

A scene classifier that uses bag-of-feature method and spatial pyramid matching method

Notifications You must be signed in to change notification settings

bilaer/Spatial-pyramid-matching-scene-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spatial Pyramid Matching Scene Classifier

Scene classifier based on k-means algorithm and spatial pyramid matching method

Introduction

In this implementation, I impleneted a standard k-mean algorithms for generating bag-of-features from training images. And then I use spatial pyramid matching method to generate a vectors of histograms which is used for image classification. I only used 6 classes of images in this implementation and I used 150 keywords for k-mean algorithm. The overall accuracy is around 0.3, Further improvement is possibly by switching the parameters such as the number of centroids. Check papers in the references section for more details.

Result

Visual words of training image

alt text alt text

Libaries and training data

  • PIL I use PIL to open and translate images into numpy array
  • Numpy I use Numpy to do image convolution and othe scientific calculation.
  • pythonCV is my own implementation of some computer vision algorithms, which I use to do gaussian smoothing and convolution.
  • SUN I use SUN database for training and classification

References

Lazebnik, Svetlana, Cordelia Schmid, and Jean Ponce. "Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories." Computer vision and pattern recognition, 2006 IEEE computer society conference on. Vol. 2. IEEE, 2006.

About

A scene classifier that uses bag-of-feature method and spatial pyramid matching method

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages