Ask Your Question

Revision history [back]

opencv_traincascade hog cascade training issue

I'm trying to train an hogcascade classifier, like hogcascade_pedestrian.xml, but for head and shoulders, i have prepared .vec file with opencv_createsamples

opencv_createsamples -info positives.dat -vec vecfile.vec -num 3500 -bg negatives.dat -w 32 -h 32

All done, but when i launch opencv_traincascade with:

opencv_traincascade -data hognew -vec vecfile.vec -bg negatives.dat -mem 2048  -numStages 15 -featureType HOG -w 32 -h 32  -maxWeakCount 100

after 15 stages i have in hognew directory cascades.xml , well...but when i try it with detectmultiscale it doesn't work, program freeze, with hogcascade_pedestrian.xml it's all ok.

When i open cascade.xml and hogcascade_pedestrian.xml they are slightly different Anyone can give me an hand to understand how to train hogcascade?