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

Save the Hog into XML #2

Open
chenxiemin opened this issue Jun 4, 2017 · 6 comments
Open

Save the Hog into XML #2

chenxiemin opened this issue Jun 4, 2017 · 6 comments

Comments

@chenxiemin
Copy link

Hi, is it able to save the clf_pickle_all_v1.p into *.xml so that I can use it in c++ detectMultiScale() function?

Sorry for I use this way to ask you the question, thanks very much.

@JunshengFu
Copy link
Owner

Hi @chenxiemin

If you want to retrain the classifier for svm and save them into xml, you can do it with my code in file svm_pipeline.py at line 447 to 552, and just choose the way you want to save the result. You can get the original image with the links I provided in the section named "1.1 Extract Histogram of Oriented Gradients (HOG) from training images".

If you want to reuse my trained svm classifier, you first read it by file svm_pipeline.py line 464-467, and then rewrite to xml accordingly. But, I use LinearSVC from sklearn.svm, if you want to use my model directly, you need to call scikit-learn functions from C++ (e.g. https://stackoverflow.com/questions/30232743/calling-scikit-learn-functions-from-c)

Hope it helps!
.

@chenxiemin
Copy link
Author

Hi @JunshengFu

Would you mind to point me where's the download link of the kitti car database?
I just download several packages from the link: http://www.cvlibs.net/datasets/kitti/eval_object.php

But none of them is the right one. Thanks very much.

@JunshengFu
Copy link
Owner

Hi @chenxiemin

  • Here are example images come from a combination of the GTI vehicle image database, the KITTI vision benchmark suite.
  • Here you can find the Udacity data. In each of the folders containing images there's a csv file containing all the labels and bounding boxes. To add vehicle images to your training data, you'll need to use the csv files to extract the bounding box regions and scale them to the same size as the rest of the training images.

@chenxiemin
Copy link
Author

Hi @JunshengFu

It helps me much, the 64x64 images are really I need.

Do you have the non-vehicle dataset? Thanks again.

@JunshengFu
Copy link
Owner

Hi @chenxiemin

  • Here are some cropped non-vehicle images, and if you need more you can simply crop any images which don't contain vehicles.

@chenxiemin
Copy link
Author

Hi @JunshengFu

It's totally enough, thanks for your sharing.

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

2 participants