1000 Image Haarcascade

In my last blog I said I said my next haarcascade file would incorporate 949 image, but in my intro monologue I stated that was changeing to 1000 images. This blog is about the 1000 image file. I created the file with the following command:

haartraining.exe -data cascades -vec vector/facevector.vec -bg bg.txt -npos 1019 -nneg 2105 -nstages 10 -mem 8192 -maxfalsealarm 0.392 -mode ALL -w 25 -h 25 -nonsym

You can see I downloaded more smile images then I expected, and created a 1019 image file. The training session ended with a message saying I had met the maximum error rate, so my file might not contain all of the images I downloaded. Maybe that's why the lady in a yellow bikini is no longer getting a smiling hit. However, some video frames are now getting smile hits, that weren't getting hits before. So as of this writing I'm running another training session with a maxfalsealarm rate of 0.391, and maybe that will give me a few more smile hits (still using the same video of smiling lady celebrities).


Haarcascade Smiles File

Fast forward, and the haarcascade file with a maxfalsealarm value of 0.391 is finished; still ended with max errors achieved. The lady in a yellow bikini still isn't showing up as a smile, so as of this writing I'm trying out 0.3905 (I tried 0.39 and it got caught in a loop). I mentioned in an earlier blog that the haarTrining.exe only provides 6 digits of accuracy for maxfalsealarm (using gentle adaboost), but that means I might need to use .390001 (if that still terminates early, and I know .39 is too low for 1000 images and 10 stages, then I'd have to increase the number of stages - that risks overtraining, and not getting any smile hits at all). Here's the video from using a haarTraining command of:

haartraining.exe -data cascades -vec vector/facevector.vec -bg bg.txt -npos 1019 -nneg 2105 -nstages 10 -mem 8192 -maxfalsealarm 0.391 -mode ALL -w 25 -h 25 -nonsym

I'll show the video created with the maxfalsealarm = 0.3905 in my next blog. I'm also going to add images from the video used for this page (and the last several blogs) and modify facial.py; the program that creates images of just the head from my downloaded images (and converts them to gray scale). The program video_streamer14.py (the smile detection program) looks for head positions that aren't quite frontal, head on images. I still have facial.py looking just at frontal, head on images; I'm going to modify that to include slightly off kilter heads. However. my next blog won't come out untill I have accumulated 2000 smiling head images (as promised in my homepage intro, made right after the last blog).

Return To My Blog Page       Haarcascade Smiles File       Return To My Programming Page