Giter Club home page Giter Club logo

pg_bow_demo's Introduction

========================================================================
Image Classification using Bag of Words and Spatial Pyramid BoW
Created by Piji Li
Email: [email protected]
Blog: http://www.zhizhihu.com
Weibo: http://www.weibo.com/pagecn
10/24/2011

Some code are from:

S. Lazebnik, C. Schmid, and J. Ponce, "Beyond Bags of Features: Spatial 
Pyramid Matching for Recognizing Natural Scene Categories," CVPR 2006.

========================================================================

Use:
1, follow labes/readme to prepare data
2, go to libsvm/: make
3, modify ini.m: rootpath=your demo path, and then run main.m.


The BOW and Dictionary is in the dir:/data/global, size of BOW_sift.mat is (DictionarySize * #images).
Size of dictionary.mat is (DictionarySize *  dim of features).spatial_pyramid.mat is the Spatial Pyramid BoW.


In /data/local is the sift features for each images. 

========================================================================
Classification using BOW rbf_svm
Accuracy = 76.6667% (92/120) (classification)

Classification using histogram intersection kernel svm
Accuracy = 81.6667% (98/120) (classification)

Classification using Pyramid BOW rbf_svm
Accuracy = 82.5% (99/120) (classification)

Classification using Pyramid BOW histogram intersection kernel svm
Accuracy = 90% (108/120) (classification)

========================================================================
Idea from:
S. Lazebnik, C. Schmid, and J. Ponce, "Beyond Bags of Features: Spatial 
Pyramid Matching for Recognizing Natural Scene Categories," CVPR 2006.

Images from:
Li, Piji, and Jun Ma. "What is happening in a still picture?." 
In The First Asian Conference on Pattern Recognition, pp. 32-36. IEEE, 2011.

Piji Li, Jun Ma, Shuai Gao. Actions in Still Web Images: Visualization, Detection and Retrieval. 
The 12th International Conference on Web-Age InformationManagement (WAIM 2011). Springer, 2011.

SVM from: 
Chih-Chung Chang and Chih-Jen Lin, LIBSVM : a library for support vector machines. 
ACM Transactions on Intelligent Systems and Technology, 2:27:1--27:27, 2011. Software available at http://www.csie.ntu.edu.tw/~cjlin/libsvm 

pg_bow_demo's People

Contributors

lipiji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pg_bow_demo's Issues

images identification

is it possible to identify the images that are wrongly classified in your code?

please reply.

Error loading sift features

CalculateDictionary.m stops at line 31 and gives error:
unable to load file PG_BOW_DEMO\data\local\00000001\sift_features'. No such file or directory.
would you help, at which step sift_features are supposed to be created?
any solution to correct?

Error running the main function

When I run the main function, the error below is found.

Error using svmtrain (line 233)
Y must be a vector or a character array.

Error in do_classification_rbf_svm (line 38)
model=svmtrain(train_labels, train_data, options);

Error in main (line 51)
do_classification_rbf_svm

Any solutions to correct this?

Error using load

Number of columns on line 2 of ASCII file D:\project-major\PG_BOW_DEMO-master\data\local\00000001\sift_features must be the
same as previous lines.

Error in CalculateDictionary (line 31)
load(inFName, 'features')

Error in main (line 31)
CalculateDictionary(pg_opts, dictionary_opts);

how to correct this error?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.