opencv_traincascade hog cascade training issue [closed]

asked 2013-11-25 13:17:45 -0500

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?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-23 04:37:41.519082


Not sure why the program is crashing, but in the opencv_createsamples utility you shouldn't add the background information, only the positive samples.

Pedro Batista gravatar imagePedro Batista ( 2013-11-26 04:41:31 -0500 )edit