Ask Your Question
0

Help with haar training

asked 2014-02-02 14:33:06 -0600

knoen gravatar image

Hi

I have some trouble with the opencv_haartraining.exe. It hangs after a certin num of steps. I cant seem to get it to work properly. This is my params:

-data GT01 -vec G01_442_2424.vec -bg negfile.txt -npos 10 -nneg 26 -nstages 15 -nsplits 2 -nonsym -minhitrate 0.97 -maxfalsealarm 0.5 -mem 1024 -mode ALL -w 48 -h 11 PAUSE

Can someone give me hints what might be the reason it hangs?

Im trying to make the classifier find licens plates. I read on the govermental site that handels plates that a regular plate is 480x110 mm. So i figured that the ratio of the params -w and -h should be same. Is this correct?

I dont have much images, positive or negative. This is a test run. I will go out and film on the road when i drive to get more samples. Then both negative and positive images will be "roadlike".

Any ideas?

Tnx :)

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2014-02-03 04:28:39 -0600

Bartis Áron gravatar image

Maybe you should check the size or number of your negatives. I'm not really sure about the haartraining (it is deprecated and the traincascade is more advanced), but if it works like the traincascade, than the number of the negatives doesn't mean too much. Suppose only one big negative (say 480 * 110) then it contains one hundred times more data than one of your positives. That could slow greatly the procedure.

edit flag offensive delete link more

Comments

Like he said, drop the haartraining interface and switch to traincascade interface. It is more mature, and has much more support on this forum. If you just use the search button on this Q&A forum, you will be supprised how much topics on cascade training there are with good explanations of all the limits / guidelines.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-02-05 04:47:02 -0600 )edit

Hi! were you able to solve your problem? because I'm also facing the same issue and I'm using opencv_traincascade. basically its just hangs after few stages. I'm using 100 pos and 100 neg datasets for training and here's my param:

opencv_traincascade -data data -vec one.vec -bg bg.txt -numPos 100 -numNeg 100 -numStages 15 -w 35 -h 50

size of my positive images are 35x50 and negative images are 640x480. appreciate if you could help me out here, I've also tried with 100 positive and 500 negative but still the same result.

Thank you.

jugalRupela gravatar imagejugalRupela ( 2016-12-02 04:10:58 -0600 )edit

@jugalRupela , please do not post answers, if you have a question or comment

berak gravatar imageberak ( 2016-12-02 04:17:28 -0600 )edit
1

also, please make a new topic for your issue ... it seems not the place here.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-12-02 06:57:08 -0600 )edit
2

Okay got it.... sorry just a beginner..

jugalRupela gravatar imagejugalRupela ( 2016-12-02 07:13:41 -0600 )edit

Question Tools

Stats

Asked: 2014-02-02 14:33:06 -0600

Seen: 358 times

Last updated: Feb 03 '14