Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I train svm with my own dataset? #1

Open
wltn021 opened this issue Nov 3, 2017 · 2 comments
Open

How can I train svm with my own dataset? #1

wltn021 opened this issue Nov 3, 2017 · 2 comments

Comments

@wltn021
Copy link

wltn021 commented Nov 3, 2017

hello
I want to train svm with my own dataset
I wonder about what is Positive_training_set & Negative_training_set
And, in this path, "DATASET\POSITIVE\" & "DATASET\NEGATIVE\", How should I put images, labels, etc?

also, please tell me, what kind of dataset that you used to make "vehicle_detector.yml"
Thanks.

@ahmetozlu
Copy link
Owner

Positive Training Set = It should contain that what you want to detect. For example, if you want to detect and count vehicles, positive training set should contain vehicle images from front and behind view.

Negative Training Set = It should contain except what you want to detect. For example, trees, traffic signs, roads or pedestrians can be negatives for your case.

You should create positive and negative datasets and you should put positive images (jpeg or png) to "DATASET\POSITIVE" path and negative images (jpeg or png) to "DATASET\NEGATIVE" path.

The algorithm needs a lot of positive images (images of vehicles) and negative images (images without vehicles) to train the classifier. Then program will extract features from it automatically.

Be careful about cropping all positive and negative images to same window size (e.g. 24x24).

I created my own dataset. Actually, datasets must be scene specific to reach high accuracy. Therfore, I recommend that you should create your own dataset. To do it automatically, you can use MATLAB, you can click and save images from your scene easily by a MATLAB script. However, you can find public vehicle datasets (you just need images) on the internet.

@severus-tux
Copy link

@ahmetozlu , We are trying to detect motor Bikes (side ways) . We have collected around 250 unique positives cropped (but not resized) and around 650 negatives (We can easily get more of them) . Are the numbers good enough ?

Should the negatives be also of the same size as that of positives ?

Here is some more details of the problem we are facing and some sample positive images : https://stackoverflow.com/questions/49664749/best-cascade-for-detecting-mororcycles-side-views-hog-lbp-haar-other

Anticipating your help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants