Ask Your Question
0

Training Haar cascades for face detection..

asked 2019-07-29 15:24:16 -0500

ateeb gravatar image

updated 2019-07-29 15:47:53 -0500

berak gravatar image

Hello everyone, I have been given a task to train general purpose face detector using haar cascade. My current approach, is to detect faces in the CelebA dataset using INTEL FRONTAL FACE CASCADES. My positive set contain 6000 face crops. My negative set contains 10,000 images of mostly aircrafts. QUESTIONS:

  1. I wanted to know atleast how many images should be in each set to get good results?
  2. after training with current setup i get "leaf hitrate achieved, branch training is terminated" is this normal.
  3. Is CelebA dataset even suitable for this purpose?
  4. does using negatives of sametype(aircrafts) affect accuracy?
  5. Does resolution of negatives matter?

Note : Face Crops are all square and of same size. Resolution of negatives is around 300x180.

Training parameters: opencv_traincascade -info info.lst -vec positives.vec w-24 -h 24 -numPos 5200 -numNeg 10000 -numStages 10 -minHitRate 0.998 -minFalseAlarmRate 0.25

edit retag flag offensive close merge delete

Comments

using INTEL FRONTAL FACE CASCADES

what's this ?

berak gravatar imageberak ( 2019-07-29 15:43:09 -0500 )edit

not an answer, but:

2) yes. it did, what you told it to do.(but you might not like the result)

4) yes. use "natural background" for faces (in a similar scale even). aircrafts only aren't natural and will degrade the result

5) it will sample multiple sliding windows (in positive size, like 24x24) from your image, as many as possible

please also note, that as great as vj cascades have been in 1998, you probably should use / train some cnn for that purpose nowadays, they're much faster and accurate.

the tools to train those cascades are no more built in current opencv (4.1.1)

berak gravatar imageberak ( 2019-07-29 15:49:25 -0500 )edit

Thanks for the advise.. but i am constrained to use it. Btw, is CelebA a suitable dataset for training haar or lbp cascades?

ateeb gravatar imageateeb ( 2019-07-29 22:14:16 -0500 )edit

is CelebA a suitable dataset

yea, probably

berak gravatar imageberak ( 2019-07-30 06:39:48 -0500 )edit

thanks man

ateeb gravatar imageateeb ( 2019-07-30 11:31:17 -0500 )edit

keep us updated ! ;)

berak gravatar imageberak ( 2019-07-30 11:40:31 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-03-29 06:08:41 -0500

ComputerVisionary gravatar image

The parameters and the neg. samples you choose will lead you to a poor cascade: 100%.

Take a look here for a more sophisticated approach to the cascades training: http://www.vision-ary.net/2015/03/lar...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-07-29 15:23:30 -0500

Seen: 149 times

Last updated: Mar 29 '20