0

I am a college student, obviously i am newbie in Machine learning so please bear with me.

I am implementing a Java application that would recognize and classify Road/Traffic signs and my major problem is to create and train SVM with SURF descriptors.

I read a lot and came across many different things when it comes to SVM i became even more confused but i will try to clarify what i understood.

FIRST: i know that i must have a dataset that includes Pos images(images that have my objects) and Neg images(images that don't have my objects) to train SVM. I tried to look how it is done in python due to the lack of documentation in Java and came across this code

import numpy as np
dataset = np.loadtxt('./datasetExample.csv', delimiter=",")

And it was simple as that, what is CSV doing here? where is the images of the dataset? i know that the data has to be represented in numbers like inside the CSV file, but where they came from and what it has to do with SVM.

SECOND: I found that in almost all resources SVM can be trained by two ways HOG Descriptors or BagOfWords and didn't find the SURF Descriptor method(ACTUALLY i am not sure if it is possible.. but my Dr. said it can be done).

THIRD: Since i am classifying traffic signs i need to have more than one class (EX. One for Warning signs, one for Regulatory signs, etc..), and each class of course has sub-classes like in the Speed limit signs it includes different types of signs. I came across smth called Multi-Class SVM and i really don't know what is that!!

Currently i managed to extract SURF Descriptors from a given image using this code.

   Mat objectImage = Highgui.imread(signObject, Highgui.CV_LOAD_IMAGE_COLOR);
   featureDetector.detect(objectImage, objectKeyPoints);
   descriptorExtractor.compute(objectImage, objectKeyPoints, objectDescriptors);
   datasetObjImage.add(objectImage);
   datasetKeyPoints.add(objectKeyPoints);
   datasetDescriptors.add(objectDescriptors);

What i was planning to do is to loop over all images of the dataset and extract their descriptors features to train the SVM, but i stucked their since i found the dataset is actually doesn't contain images at all....

So please i would appreciate any sort of help or descriptive steps to achieve that or even good resources i can look at. Thanks

j.doe
  • 47
  • 6
  • 1
    John, welcome to computer vision, where everything is unclear and nothing is easy. Your post contains two actual questions, and they concern themselves with parsing CSV and none of the tags. I understand you're frustrated. Breathe in, breathe out. Ask. I'm here to help. There is no easy way. – Stefan Dragnev Apr 18 '18 at 19:53
  • Thanks for trying to help, I need guidelines step by step to implement and train `SVM` classifier for `Traffic signs` in `Java` – j.doe Apr 18 '18 at 19:58
  • SVM requires a stable set of features. SURF produces feature vectors of random lengths every time. You just can't combine the two. Use HOG or Hu moments. Noo easy waaay. – Stefan Dragnev Apr 18 '18 at 20:17
  • Fix the question, by the way. – Stefan Dragnev Apr 18 '18 at 20:28
  • Could you pls check this question and answer https://stackoverflow.com/questions/16162150/opencv-for-android-training-svm-with-surf-descriptors?rq=1 , i want to make sure that there is no way to train `SVM` with `SURF Descriptors` ? – j.doe Apr 19 '18 at 08:09
  • 1
    It is possible, you need make more research. These return from Google search:https://www.ripublication.com/ijeer16/ijeerv8n1_01.pdf and https://ieeexplore.ieee.org/document/4624384/ – cemsazara Apr 19 '18 at 14:54

0 Answers0