convert_cascade: error while loading shared libraries: libml.so.2.1: cannot open shared object file: No such file or directory

asked 2014-08-12 01:22:21 -0500

Punith K gravatar image

I'm following http://note.sonots.com/SciSoftware/haartraining.html to train my cascade classifier, it has created some folder is my data folder, I want to create the xml file using convert_cascade executable, but it pops up above error, even though I set environmental variables and created symbolic link in the working directory, but I don't find any libml.so.2.1 in my lib folder. I have seen libopencv_ml.so.2.4 and linopencv_ml.so.2.4.9. even if a create symbolic link to these files, it's still pops above error message. any possible solution. I searched everything. Please help if anyone knows the answer.

edit retag flag offensive close merge delete

Comments

dear, that stuff might be just too old.

you will have to get the src for convert_cascade from the website, and compile it locally.

berak gravatar imageberak ( 2014-08-12 01:30:10 -0500 )edit

I have convert_cascade executable, compiled but it shows the above error.

Punith K gravatar imagePunith K ( 2014-08-12 01:48:33 -0500 )edit
2

if you got a binary, then it's probably dependant on outdated 2.1 libs. you need to recompile the src of it against 2.4.9.

berak gravatar imageberak ( 2014-08-12 01:51:00 -0500 )edit

Thanks for your answer, I never thought of it. If you have convert_cascade source please do give me the link, and compilation process.

Punith K gravatar imagePunith K ( 2014-08-12 02:08:14 -0500 )edit

Thanks a lot, now I can able to create my xml file.

Punith K gravatar imagePunith K ( 2014-08-12 02:34:24 -0500 )edit

@berak I want to ask you one more thing, whenever I start training it always stops in middle i.e it stopped every time in the 5th stage, either Haar Training or Train cascade method I use, any possible solution, Please.

Punith K gravatar imagePunith K ( 2014-08-12 02:36:30 -0500 )edit
1

Let me point out that the sonots guide for haartraining is the most outdated thing out there. Stick to the traincascade interface and use the updated and bugfree C++ API. As to convert cascade functionality, there is a reason why it is not part of the library, it is simply not working properly...

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-12 05:09:09 -0500 )edit

@StevenPuttemans I want to know clearly,Is there any hard rule to chose the number of positive and negative samples so that training never stops in between. Like you said I have gone through all possible answers in the forum.

I did follow the new Train Cascade method over the same sample, but it stuck as well at stage 5.

I found that there is one equation for number of files to be there in vec file. I could not able to achieve that since while creating samples I could not able to create as many I want. It always creates one less than the number of positive samples I have in my positive folder.

I tried both method i.e haar training and train cascade methods, for the same dataset positive=1000 and negative=2000. and false alarm rate=0.499 and mishitrate=0.95.

Punith K gravatar imagePunith K ( 2014-08-13 00:48:27 -0500 )edit

@StevenPuttemans I use,

$opencv_haartraining -data data -vec samples.vec -bg negatives.txt -nstages 3 -nsplits 2 -minhitrate 0.999 -maxfalsealarm 0.5 -npos 1000 -nneg 2000 -w 100 -h 40 -nonsym -mem 1024 -mode ALL

runs well till stage 5 then it stops ( doesn't move even a bit, i waited more than 12 hours to see progress, but no progress noticed, then gave up waiting).

If you want to share your mail id (I'm looking forward to get help from you If you don't want share here, please mail me, kpunith8@gmail.com) , I can mail my data set and obtained files, to once cross verified by you.

Punith K gravatar imagePunith K ( 2014-08-13 00:52:59 -0500 )edit

@StevenPuttemans I noticed that xml file generated using traincascade interface is lot more different than the one created by haartraining interface.

Is existing detectMultiScale and other functions that loads and interprets this new xml properly. I checked that there were no work done for reading xml created using new traincascade interface, If any please do help me.

Punith K gravatar imagePunith K ( 2014-08-13 00:58:45 -0500 )edit