0

Running opencv_traincascade, The first stage 0 has taken already 14h and is not progressing. Any ideas?, am I using too many images?. I had 245 positives cropped to -w 100 -h 75, then had 4064 negatives. I created 20 samples for each positive using create_samples app, then each .vec (245 in total) was merged to create a single .vec file, then ran the train_cascade with this last merged .vec.

thank you in advance.

Here is the command:

opencv_traincascade.exe -data Trained_Classifier-vec SamplesCollectVec_Merge.vec -bg negatives.txt -numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 2450 -numNeg 4064 -w 100 -h 75 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024

Here is a screen capture: numPos: 2450 numNeg: 4064 numStages: 20 precalcValBufSize[Mb] : 1024 precalcIdxBufSize[Mb] : 1024 stageType: BOOST featureType: HAAR sampleWidth: 100 sampleHeight: 75 boostType: GAB minHitRate: 0.999 maxFalseAlarmRate: 0.5 weightTrimRate: 0.95 maxDepth: 1 maxWeakCount: 100 mode: ALL

===== TRAINING 0-stage =====

  • Possible duplicate of [opencv\_traincascade always gets stuck](http://stackoverflow.com/questions/14552167/opencv-traincascade-always-gets-stuck) – Dima Dec 02 '15 at 19:01

1 Answers1

0

The number of samples you are using seems fine.

I suspect your sample resolution is too high. Try subsampling using opencv_createsamples: opencv_createsamples.exe -vec SamplesCollectVec_Merge.vec -bg bg.txt -num 245 -w 20 -h 15

user2320264
  • 53
  • 1
  • 5