Ask Your Question
0

Haar-cascade training took very little time and no xml was produced

asked 2014-01-13 02:32:06 -0600

I'm trying to train a new haar-cascade for faces.

I have a positive dataset of 2000 cropped face images (just the face) and 3321 negative random images.

I created positive's list using the following command:

opencv_createsamples.exe -info info.txt -vec vector.vec -num 2000 -w 10 -h 10

Where the file info.txt contains the following lines:

AJ_Cook_0001.ppm 1 0 0 64 64
AJ_Lamas_0001.ppm 1 0 0 64 64
Aaron_Eckhart_0001.ppm 1 0 0 64 64
Aaron_Guiel_0001.ppm 1 0 0 64 64
Aaron_Patterson_0001.ppm 1 0 0 64 64
Aaron_Peirsol_0001.ppm 1 0 0 64 64

Afterwords, I ran haar_training using the following command:

opencv_haartraining.exe -data harrcascade -vec vector.vec -bg infofile.txt -nstages 20 -minhitrate 0.9999 -maxfalsealarm 0.5 -npos 2000 -nneg 3321 -w 10 -h 10 -nonsym -mem 1024

Where the file infofile.txt contains the names of the background images:

Bing_000527adc064a067a7f7986f00b140fe.jpg
Bing_002744f85b0bee37f489f43fad5f613f.jpg
Bing_0048e7e5e487203dedba9feb03696b1e.jpg
Bing_00513e8879f4f544717df2c8ea0494b1.jpg
Bing_00543a6cf117f559a05f0fb7e10bd361.jpg

Training took about only an two hours and no xml file was generated. The folder harrcascade contains 20 folder with a txt file named 'AdaBoostCARTHaarClassifier.txt' but no xml was generated.

I have two questions:

1.Why did training took so very little time?

2.Why no xml file was generated?

What am I missing here?

Thanks,

Gil

edit retag flag offensive close merge delete

Comments

how many training data do you have?

Constantin gravatar imageConstantin ( 2014-01-15 04:30:18 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-01-15 12:44:05 -0600

updated 2014-01-15 12:44:52 -0600

OK, my bad. I found the cascade under the parent folder and I'm now training using opencv_traincascade.

edit flag offensive delete link more

Comments

were you able to create your xml file after that?

Joshitha gravatar imageJoshitha ( 2018-03-02 03:39:49 -0600 )edit

Question Tools

Stats

Asked: 2014-01-13 02:32:06 -0600

Seen: 339 times

Last updated: Jan 15 '14