Ask Your Question
0

training svm for image recognition

asked 2018-08-20 15:29:47 -0600

yoggiee gravatar image

updated 2018-08-21 04:25:39 -0600

Hi, I want to train svm to recognize each type of these road signs. I need some advice about training.

  1. Should I use 3-channel positive images for training or can I use grayscaled images? ( if both, what's the difference in accuracy then?)
  2. How many positives should I have in your opinion for each sign to train a good classifier? (These signs are very similar so it's gonna be tough to predict it well, Am I right?)
  3. Can I use 30x30 images or they are too small?
  4. Maybe other methods can do better like BOW or KNN?

image description

edit retag flag offensive close merge delete

Comments

" train svm to detect each type of these road signs" -- wait. do you mean detect (where ?) or classify (which ?)

berak gravatar imageberak ( 2018-08-20 20:33:31 -0600 )edit

i meant recognize, sorry

yoggiee gravatar imageyoggiee ( 2018-08-21 04:25:14 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-08-21 04:55:05 -0600

berak gravatar image
  1. color is important here, so yes.
  2. the more, the better. also, with a multi-class SVM (or such), there are no "negative" images. (for class 1, those from classes 2...N will be used as negatives). if you train a classifier from scratch, you will need a ton of images, while re-using a pretrained one (transfer learning) can be done with a few dozen images per class.
  3. 30 x 30 x 3 = 2700. that's ok. again, the larger the features get, the more training data you will need to seperate them.
  4. maybe. however, start with an easy SVM (opencv's ml classes can be simply swapped). once you have that running, you could wire in some pretrained cnn (like squeezenet) for the transfer learning (it would simply mean: cut off the last few "identification" layers from the cnn, and use it as a "fixed" preprocessing pipeline, -- image in, feature out. then you classify those "features" instead of using the images directly.)
  5. remember, there are other dl frameworks, like tf,caffe,torch,darknet, etc.
edit flag offensive delete link more

Comments

ok thanks. I was thinking about trying transfer learning(just like u said in other topic) and retrain classifier on pre-trained model 'ssd mobilenet v2 coco' with tensorflow and deploy my classifier to raspberry pi3. But I found so many tutorials and I'm a bit confused how to do this properly. Is this tutorial right? Do positive images have to be minimum 224x224 size? or can I use 30x30 ones?

yoggiee gravatar imageyoggiee ( 2018-08-21 06:25:53 -0600 )edit

i won't watch youtube videos, sorry. but cnns usually have a fixed input size, so you'd have to resize them, yes.

berak gravatar imageberak ( 2018-08-21 09:41:02 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-20 15:29:47 -0600

Seen: 691 times

Last updated: Aug 21 '18