Ask Your Question

opencv_haartraining: Invalid background description file (Windows)

asked 2012-11-21 05:15:06 -0500

Storm gravatar image

updated 2012-11-21 07:06:53 -0500

I'm trying to run opencv_haartraining on Windows 7 x64 and getting this output:

F:\opencv\bin>opencv_haartraining.exe -data HT\cascade -vec HT\positives.vec -bg
 HT\negs_full.txt -npos 208 -nneg 2000 -mem 2048 -nonsym -mode ALL -w 56 -h 12
Data dir name: HT\cascade
Vec file name: HT\positives.vec
BG  file name: HT\negs_full.txt, is a vecfile: no
Num pos: 208
Num neg: 2000
Num stages: 14
Num splits: 1 (stump as weak classifier)
Mem: 2048 MB
Symmetric: FALSE
Min hit rate: 0.995000
Max false alarm rate: 0.500000
Weight trimming: 0.950000
Equal weights: FALSE
Mode: ALL
Width: 56
Height: 12
Applied boosting algorithm: GAB
Error (valid only for Discrete and Real AdaBoost): misclass
Max number of splits in tree cascade: 0
Min number of positive samples per cluster: 500
Required leaf false alarm rate: 6.10352e-005

Tree Classifier
|  0|

Number of features used : 310730

Parent node: NULL

*** 1 cluster ***
POS: 208 208 1.000000
Invalid background description file.

HT\negs_full.txt contains full pathes to negatives (one per line):


At start I've tried to use relative paths - nothing changed.

On Linux it's successfully works with background file like this one. But this machine with Windows is more powerful and I want to use it in training... How do I run it?

I've done it about two years ago and everything was fine. If someone has training expirience with modern versions of OpenCV, please show your directories structure and description files.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-06 04:40:54 -0500

I am facing a similar issue. Any answers?

edit flag offensive delete link more

Question Tools


Asked: 2012-11-21 05:15:06 -0500

Seen: 2,399 times

Last updated: Nov 21 '12