Giter Site home page Giter Site logo

spheluo / bag-of-words-scene-recognition Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 15 KB

implementation of Bag of Words (BoW) Scene Recognition

Python 100.00%
bag-of-visual-words bag-of-words computer-vision python3 scene-recognition k-means-clustering knn-classification sift bag-of-sift

bag-of-words-scene-recognition's Introduction

Bag-of-Words-Scene-Recognition

implementation of Bag of Words (BoW) Scene Recognition

BoW procedure outline

We used dsift to find keypoints of features from training set and k-means clustering to build K vocabularies with 'build_vocabulary.py'. Next, 'get_bags_of_sifts.py' is used to identify distance between keypoints and vocabularies for each image, and build the histogram which records occurrence frequencies of nearest descriptors for each vocabulary. Finally, we calculated distances of BoW between training and testing sets and classified each testing image according to K-nearest training images. 截圖 2022-12-16 上午8 25 40

Dataset

You can get the training and testing set here.

Procedures and Results

1. Get feature vectors from 'tiny images' and use KNN classifier to predict the label of test data where the accuracy is about 0.23. The command is as follows:

python3 p1.py --feature 'tiny_image' --classifier 'nearest_neighbor'

2. Get feature vectors from 'Bag of Sift', and use KNN classifier to predict the label of test data where the accuracy is about 0.61. The command is as follows:

python3 p1.py --feature 'bag_of_sift' --classifier 'nearest_neighbor'

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.