Skip to content

Python Implementation of Bag of Words for Image Recognition using OpenCV and sklearn

Notifications You must be signed in to change notification settings

bikz05/bag-of-words

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bag-of-words

alt text Python Implementation of Bag of Words for Image Recognition using OpenCV and sklearn | Video

Training the classifier

python findFeatures.py -t dataset/train/

Testing the classifier

  • Testing a number of images
python getClass.py -t dataset/test --visualize

The --visualize flag will display the image with the corresponding label printed on the image/

  • Testing a single image
python getClass.py -i dataset/test/aeroplane/test_1.jpg --visualize

Troubleshooting

If you get

AttributeError: 'LinearSVC' object has no attribute 'classes_'

error, then simply retrain the model.

About

Python Implementation of Bag of Words for Image Recognition using OpenCV and sklearn

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages