SVM training in PCL

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SVM training in PCL

Criscabello
Hello, I'm quite new to PCL and I'm doing my final thesis using it. I managed to work with it, but there's a point where a SVM classifier is needed.

I saw that libSVM is implemented in PCL, and found some projects using it, however, I couldn't find any tutorial about training a binary SVM classifier and using it later on my code.
All I could find was https://github.com/bellonemauro/SVM_pcl_demo tutorial, but when I try to build it on QT Creator I get the following errors:

/home/criscabello/catkin_ws/src/proyecto/src/pcl_SVM_train_classify.cpp:-1: In function 'int main(int, char**)':
/home/criscabello/catkin_ws/src/proyecto/src/pcl_SVM_train_classify.cpp:119: error: 'class pcl::SVMClassify' has no member named 'getParameters'
       my_svm_parameters = my_svm_classifier.getParameters();
                                             ^
/home/criscabello/catkin_ws/src/proyecto/src/pcl_SVM_train_classify.cpp:132: error: 'class pcl::SVMClassify' has no member named 'hasLabelledTrainingSet'
       if ( my_svm_classifier.hasLabelledTrainingSet())
                              ^
/home/criscabello/catkin_ws/src/proyecto/src/pcl_SVM_train_classify.cpp:178: error: 'SVMtestReport' is not a member of 'pcl'
       pcl::SVMtestReport svm_test_report = my_svm_classifier.getClassificationTestReport();
       ^
/home/criscabello/catkin_ws/src/proyecto/src/pcl_SVM_train_classify.cpp:181: error: 'svm_test_report' was not declared in this scope
                                    svm_test_report.accuracy,
                                    ^
/home/criscabello/catkin_ws/src/proyecto/src/pcl_SVM_train_classify.cpp:213: error: 'class pcl::SVMTrain' has no member named 'adaptProbToInput'
        my_svm_trainer.adaptProbToInput();
                       ^
/home/criscabello/catkin_ws/src/proyecto/src/pcl_SVM_train_classify.cpp:269: error: could not convert 'my_svm_trainer.pcl::SVMTrain::<anonymous>.pcl::SVM::saveClassifierModel(((const char*)"./model_out.dat"))' from 'void' to 'bool'
          if ( my_svm_trainer.saveClassifierModel("./model_out.dat") ) {
                                                 ^
/home/criscabello/catkin_ws/src/proyecto/src/pcl_SVM_train_classify.cpp:354: error: 'class pcl::SVMClassify' has no member named 'hasLabelledTrainingSet'
        if ( my_svm_classifier.hasLabelledTrainingSet())
                               ^
/home/criscabello/catkin_ws/src/proyecto/src/pcl_SVM_train_classify.cpp:390: error: 'SVMtestReport' is not a member of 'pcl'
        pcl::SVMtestReport svm_test_report = my_svm_classifier.getClassificationTestReport();
        ^
/home/criscabello/catkin_ws/src/proyecto/src/pcl_SVM_train_classify.cpp:393: error: 'svm_test_report' was not declared in this scope
                                    svm_test_report.accuracy,
                                    ^
Does anybody know how to fix this or where can I find a tutorial in order to train my SVM classifier?

I'm using PCL 1.8 in Ubuntu 16.04 LTS. Also, I'm using PCL in ROS Kinetic.

Regards,

Cristian.
Loading...