Skip to content

AnhTuan-AiT/cv

Repository files navigation

Bag-of-Words

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

Note: see package_version.png in root folder

Training the classifier

py findFeatures.py -t dataset/train/

Testing the classifier

  • Testing a number of images
py 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
py getClass.py -i dataset/test/aeroplane/test_1.jpg --visualize

Troubleshooting

If you get

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

then simply retrain the model.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages