Ask Your Question
3

segmentation fault with CvSVM predict

asked Jun 13 '13

uiqbal gravatar image

updated Jun 13 '13

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

Preview: (hide)

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 (Jun 14 '13)edit

1 answer

Sort by » oldest newest most voted
0

answered Dec 2 '13

humbleAR gravatar image

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

Preview: (hide)

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 (Mar 14 '15)edit

Question Tools

Stats

Asked: Jun 13 '13

Seen: 732 times

Last updated: Dec 02 '13