Ask Your Question
3

segmentation fault with CvSVM predict

asked 2013-06-13 05:19:03 -0500

uiqbal gravatar image

updated 2013-06-13 05:21:37 -0500

Hello Everyone,

I have trained a SVM classifier with RBF kernel. Once the training is complete, I am saving it as xml file. I need to add some other details in the same .xml file as well. So, I am reading it again and using opencv FileStorage to update xml file accordingly. All this work is done perfectly but when I am loading the classifier again and trying to predict a query sample the program crashes and gives a segmentation fault. Segmentation fault arises exactly at the time of prediction.

Can anyone please guide me what could be the reason behind this?? or is there any efficient way to debug this problem??

I have added extra information (at the end of xml file) as follows:

</my_svm> <combinationcount>1</combinationcount> <rtype_0>0</rtype_0> <pixvaltype0>3</pixvaltype0> <normtype0>2</normtype0> <aggtype0>2</aggtype0> <bestaccuracy>8.2044540405273438e+01</bestaccuracy> </opencv_storage>

Thanks, Umar

edit retag flag offensive close merge delete

Comments

hi uiqbal - sorry i do not know to fix ur problem. but can you tell me how did you save the train model in a xml file. i am searching for a way to save the train model in a xml file, but still couldnt do that. can you post that piece of code here plz. thank you.

Heshan Sandeepa gravatar imageHeshan Sandeepa ( 2013-06-14 04:36:12 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-12-02 11:13:57 -0500

humbleAR gravatar image

I have exactly the same problem but I don't see an answer for now.

edit flag offensive delete link more

Comments

Hi, I know this is too late. But i choose the text file instead of XML. There by i was able to append training data again and again.

Heshan Sandeepa gravatar imageHeshan Sandeepa ( 2015-03-14 09:21:17 -0500 )edit

Question Tools

Stats

Asked: 2013-06-13 05:19:03 -0500

Seen: 516 times

Last updated: Dec 02 '13