0

How could I use the Support Vector Machine in scikit for python on images I have on my disk.

I have a folder which contains images of cars in png format and I would like to run SVM to be able to classify them into 3 categories

  1. cars
  2. buses
  3. motorcycles
0

1 Answer 1

2

Check out the digits classification tutorial from the scikit-learn website.

http://scikit-learn.org/stable/auto_examples/classification/plot_digits_classification.html

Your case is a modification of this example with three classes instead of 10

To load your own images, refer this question

Using sklearn load_files() to load images from png as data

Sign up to request clarification or add additional context in comments.

3 Comments

What about opening multiple images at the same time.Like I have 8 images, I would like to use 4 for training and 4 for prediction. PS: I started coding in python today
I think the SVM algorithm requires that the images be given one by one, this is usually done by providing the directory in which images are stored instead of the images themselves. Python is a easy to learn language, you'll be upto speed in no time. I suggest you try the google python course to learn the language, its worth it.
There's a little tick beneath the upvotes, dont forget to click on it :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.