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

SVM training failed #23

Open
minghaohsu410168 opened this issue Apr 6, 2021 · 7 comments
Open

SVM training failed #23

minghaohsu410168 opened this issue Apr 6, 2021 · 7 comments

Comments

@minghaohsu410168
Copy link

Hello,

Thanks for the nice tool, but I want to ask how to train the svm model, I tried training the model using lcas_simple_data.zip but always got "train failed", and the console got "mv cannot stat pedestrian.* no such file or dictionary".

How should I do, can you give me some advice, thank you.

@yicheng6o6
Copy link

@minghaohsu410168
Hi, I am sorry to bother you.

I meet the same problem and I want to know if you have a solution to train the SVM classifier?
Would you like to tell me how to run the program?

Best wishes,
Yicheng

@minghaohsu410168
Copy link
Author

@yicheng6o6
Did you clone the devel branch? I guess that the pedestrian file is not generated sucessfully before training. The pedestrian file is located in the build/svm folder.

@yicheng6o6
Copy link

@minghaohsu410168
Thank you very much for your reply.

I built the devel branch successfully, but I also meet the following error when I tried training the SVM classifier (use lcas_simple_data.zip):
svmp2

And I have a another question:
In README.md said need to manually add negative examples, but when I checked these annotation txt files, I found all labels were "pedestrian". I saw many other bounding boxs in each pcd file, are these bounding boxs just labeled as "dontcare"?
svmp3

Any help is much appreciated:)
Yicheng

@minghaohsu410168
Copy link
Author

minghaohsu410168 commented Oct 13, 2021

@yicheng6o6
I think you didn't generate the pedestrian file. You need to extract the feature manually (enter the Object ID, choose the Object Class and click the Extract Feature button). After feature extraction, an pedestrain file will be generated in build/svm folder. Then you can train the svm model.

Yes, the other bounding box without labels are dontcare label. You can check the generated pedestrian file, and it will be
the format which comply with LIBSVM (For example 1 1 : 0.5 2 : 0.3). Adding the negative examples maens that you need some -1 label (For example -1 1 : 0.01 2 : 0.02).

@yicheng6o6
Copy link

@minghaohsu410168
Thank you very much for your reply.

Now I can generate the pedestrian file and other classes file in build/svm folder.

But when I checked these files, I found all classes were labeled as "1".
svmp4

From my understanding, the classes of: dontcare, car and wheelchair should be "-1" (non-human), namely I suppose adding the negative examples means annotate the object with non-human classes.
Is my understanding correct? If not, May i have your suggestions?

Best wishes,
Yicheng

@minghaohsu410168
Copy link
Author

Yes, if you want to use the model to detect pedestrian only, the car, dontcare are -1 label. You can modify the feature extraction code in viewer.cpp.

@yicheng6o6
Copy link

@minghaohsu410168
Thank you very much for your reply.

I've finished reading the viewer.cpp, I think I can use writeData() function.
Unfortunately, I don't know how to separate pedestrian with other classes.

Is it possible that I change the dontcare, car and wheelchair to -1 label manually?
Namely after annotating these objects, open these label txt files and modify 1 to -1.

Best wishes,
Yicheng

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